This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session is not expired after specified time period

 
Raghu Sha
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After session got expired, it is not redirect to specified page.



web.xml



It is not valdating inside IF condition.
Please suggest

 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I missing something? How is 'response' initialised ?

Also, I thought the session listener methods sessiomCreated() and sessionDestroyed() are called asynchronous to a servlel request so one does not have a valid HttpServletResponse to re-direct.
 
Raghu Sha
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry.. I only missd.

If there is no session, it should have response object? Am i correct?
Please suggest, how i can handle session timeout, if it expires it should go login page
 
Rajasekhar Eega
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can do it by using Filter also....



web.xml for filter configuration
--------------------------------------



I hope it would be helpful to you.....
 
Raghu Sha
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried same way. But Filter itself not called.
Any other things need to configure apart from that?
I put sop inside doFilter,it is not getting printed.

using Filter it should recogize session-timeout configred in web.xml?

I am using Spring MVC. Do i need to configure in spring-servlet.xml for filter configuration?
 
Sourabh Bawage
Ranch Hand
Posts: 33
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think the session is not invalidated.....did you debug and check for the values??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic