Another good point, and I'll add code to catch that. But, as I understand it, session would never be null (not at this point in the code anyway, which is inside an Action) because a session would have been established by now anyway.

Also, the exception wasn't in this section of code anyway, it actually happens about 20 lines after this. I'm going to take your suggestion anyway because I like adding checks that don't hurt anything, might save me a headache down the road, but I don't think this will address my initial problem.

Thanks Luiz!

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Luiz Esmiralha wrote:
On Mon, 8 Nov 2004 11:52:14 -0800 (PST), [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

if (session == null || session.getAttribute("sessionAlive") == null) {
 request.setAttribute("message", "Your session timed out.  Please log on 
again.");
 session.invalidate();
 return mapping.findForward("reload");
}


Calling session.invalidate() will throw a NullPointerException if
session == null.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to