Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

deprecated HttpSession.putValue vs HttpSession.setAttribute

843833Jan 13 2002 — edited Jan 14 2002
I have written a number of servlets that track and manage a user using HttpSession. I have been trying to attach the user profile (a class I wrote that contains simple info like name, age...) to the HttpSession with the setAttribute method. When I get my HttpSession back on the next Servlet I use the getAttribute method only to have my Servlet killed at that line of code ie, after session.getAttribute( "my_attribute") the Servlet stops executing code.

When I use the deprecated putValue and getValue, everything works just fine.

Does anyone have a solution to this one? Thanks in advance for any assistance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2002
Added on Jan 13 2002
1 comment
331 views