Re: Session invalidation problem

2004-11-08 Thread Andrew Hill
If a user has multiple windows/frames/tabs open and both are making requests at once (or it could be a double submit from a single window (which you could catch using tokens)) then you might see this sort of thing occur occasionally. In this situation you have two threads both of which have a

Re: Session invalidation problem

2004-11-08 Thread Frank W. Zammetti
W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 4:40 PM To: Struts Users Mailing List Subject: Re: Session invalidation problem Can do... Remember, this is an inherited app, so don't kill me for things done here :) Here's the execute() me

RE: Session invalidation problem

2004-11-08 Thread Barnett, Brian W.
it. Good luck. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 4:40 PM To: Struts Users Mailing List Subject: Re: Session invalidation problem Can do... Remember, this is an inherited app, so don't kill me for things done here :) Here&#x

Re: Session invalidation problem

2004-11-08 Thread Frank W. Zammetti
Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Barnett, Brian W. wrote: Hmm. Can you share a bigger snippet of the code, and point out where the exception is being thrown? (the 20 lines after) -----Original Message----- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]

RE: Session invalidation problem

2004-11-08 Thread Barnett, Brian W.
lse), a session will not be created. In this latter > case, session will equal null. > > -Original Message- > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Sent: Monday, November 08, 2004 3:49 PM > To: Struts Users Mailing List > Subject: Re: Session invalidation

Re: Session invalidation problem

2004-11-08 Thread Frank W. Zammetti
this latter case, session will equal null. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 3:49 PM To: Struts Users Mailing List Subject: Re: Session invalidation problem Another good point, and I'll add code to catch that. But,

RE: Session invalidation problem

2004-11-08 Thread Barnett, Brian W.
request.getSession(false), a session will not be created. In this latter case, session will equal null. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 3:49 PM To: Struts Users Mailing List Subject: Re: Session invalidation problem Another good

Re: Session invalidation problem

2004-11-08 Thread Frank W. Zammetti
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

Re: Session invalidation problem

2004-11-08 Thread Luiz Esmiralha
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.fin

RE: Session invalidation problem

2004-11-08 Thread fzlists
That's a good point, I forgot that. I've added code to handle that situation. I know that wasn't it though based on the stack trace (the exception is thrown about 20 lines after the check we're talking about), but I can imagine this might have come up too, so it made sense to add. Thanks Bria

RE: Session invalidation problem

2004-11-08 Thread Barnett, Brian W.
Session.getAttribute(sessionAlive") will throw an IllegalStateException if it is called against a session that is invalidated. Try something like this: try { Session.getAttribute(sessionAlive"); } catch (IllegalStateException e) { request.setAttribute("message", "Your session timed out. Plea