Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Session values getting lost

Dilip Ladhani

2007-03-11

Replies:

Hello,

I have this wierd problem, I have spent a few hours debugging. I am
on tomcat 5.5 struts 1.29.
I was using tomcat 5.0.x and struts 1.3.5 earlier and all seemed well.
I switch and encounter this strange problem.

My home jsp is a simple page, where I invalidate the session, create
new and then add an object to my session
 session.invalidate();
 session = request.getSession(true);
          session.setAttribute("userInfo", user);

Now I go to the jsp1, and retrieve the userInfo from session, all works well.
Now, when I go to jsp2, (off a link in my header), and try to retrieve
userInfo, I get a null???? Why's that?

What am I doing wrong??

thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.