Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server Error

 
Anila Mathew
Ranch Hand
Posts: 69
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i click on a link when the session times out, i am getting a server error .How can i solve this??
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use a session listener and on sessionDestroyed(HttpSessionEvent) you can forward the user to any page i.e. login page.

i think if you define a welcome page in your web.xml. any request after timeout will be automatically forwarded to the welcome page. not sure about it.

<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>


this solution is not working with me. try it out.
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're thinking of:


Jules
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah i got it thanks Jules. do it like this as Jules said. it will work.
 
Ajith Anand
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or

if you need PAGE specific exception handlers , instead of a generic exception handler you may add headers as the ones below in your jsps':


PAGE1.JSP





PAGE2.JSP

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic