You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jerry Jalenak <Je...@LABONE.com> on 2002/08/02 22:32:44 UTC

Session object being removed when exception is thrown

All,

Not really a struts issue, but since everything is running in Actions,
thought I'd throw is out and see if anyone call tell me what is going on
:-)

I've got two Actions.  In the first one I create a bean to contain basic
user info and store it in the session 

	HttpSession session = request.getSession();
	session.setAttribute("User", userBean);

  In the second Action, I access the bean 

	HttpSession session = request.getSession();
	userBean user = (userBean) session.getAttribute("User");

and extract various data elements through the beans get methods.  The
problem I am running into is that (keep in mind this is in development) if I
throw an exception, hit the back button on browser and reload the form, when
I go through the action a second time, my "User" object has apparently been
removed from the session (I can print out the 'user' variable and see that
it is null.)  Does throwing an exception cause the session to be reset in
some manner?

TIA and TGIF!

Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
jerry.jalenak@labone.com


This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>