This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Login Session Time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Login Session Time out" Watch "Login Session Time out" New topic
Author

Login Session Time out

Ola Daniel
Ranch Hand

Joined: Jul 27, 2005
Posts: 105
I want my web application to display a page which says your session has timed out when a time out occurs. I dont want it to just display the logon screen when the user's session had timed out. I have tried placing the following code in my web.xml,

But My web application still brings up the Login Screen whenever the user the user login has expired.


Help pleaser.


SCJP 1.4, SCWCD 1.4
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Try using a tool like the LiveHttpHeaders plugin for Firefox to see, exactly what error code is being returned.
Maybe it's not a 408.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Or perhaps, your security settings are not allowing your session expired page to be shown.

What url-pattern are you using?
Ola Daniel
Ranch Hand

Joined: Jul 27, 2005
Posts: 105
Heres the <security-constraint> part of my web.xml.





I dont think the url-pattern is preventing the message page from coming up.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Login Session Time out
 
Similar Threads
MD5 and Jetty webserver security?
Dealing with Timed out sessions...
authentication in jboss
Unauthenticated Access to a Secured Resource?
Detecting Servlet timeout using ajax/post.