You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sébastien Bergia <se...@edifixio.com> on 2003/05/09 12:40:12 UTC
How to keep a same session between two jsp ?
Hi all,
In my first JSP I use a form :
<jsp:useBean id="Form" class="com.toto.action.Form" scope="session">
Once populated, I put it into the session, in order to reuse it in the following JSP, using :
session.setAttribute("MyForm", Form);
If I make just after the previous line :
((Form)session.getAttribute("MyForm")).getToto()
It works !
In my second JSP, I use this form thanks to :
<jsp:useBean id="MyForm" class="com.toto.action.Form" scope="session">
Then, if I use exactly the same call to getToto(), I have a NullPointerException. Why ?
I precise that I have an object called "MyForm" into the session of each JSP, but the session ids are different.
Anyone has an idea ?
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org