>
> as i said before, this works about 60-70% of the time, and the subsquent
> page will successfully extract 'userName' and assign it to 'foo'.  but
other
> times the value isn't there and foo is null, throwing a
nullpointerexception
> when i try to put it back into the session.
>
Note that "putting it back in the session" is unnecessary. The getValue()
method doesn't remove an object reference from the session object, it just
gets a copy of the reference. Only removeValue() removes the reference.

So, as a first step, take out the code that does a putValue except where you
wish to associate the key "foo" with a different object.

_3
M

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to