requst is new so request.getSession() won't work right?
[My Blog]
All roads lead to JavaRanch
HttpSession userSession = req.getSession(true);
userSession.setAttribute("userId", userId);
Sarath Mohan
Originally posted by Vishnu Prakash:
You cannot bind an interger to a session.
Here userId is an int.
42
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |