• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Timeout redirection not working properly

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Our application is a Struts based J2EE Application.We want to specify SessionTimeout as 45 Minutes.So I did this by adding Session-Config element in web.xml and set Session-timeout as 45.We want to redirect to different page when client tries to click on page after SessionTimeout.we added error pages for error codes 400,404,500,408 etc.Before ,We saw it throwing 500 error when session is timedout.So we added custom page to show when error is 500.But its not working as expected still its showing something as
<TD class="d1" NOWRAP error 500 server caught unhandled Exception.
Is it the right way that I used to redirect to SessionTimeout page when session is timed out?If so why its not working..?Need help..Its Urgent..
Thanks,
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also working on STRUTS application. For session timeouts and re-direction we always do that in the action class. The limitaion is that the user will not be automatically taken to the redirected page but only if he clicks any link/button after the timeout he will be redirected.
Sekar
 
Radhika Reddy
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
We want the samething to happen like when user clicks after session timeout he should see new session Timeout page.Can you give me the code example like how you did it in action class?..
Thanks,
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just do
HttpSession session = request.getSession(false);
if session is null redirect to a session time out page.
 
reply
    Bookmark Topic Watch Topic
  • New Topic