aspose file tools*
The moose likes Servlets and the fly likes Session is not expired after specified time period Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session is not expired after specified time period " Watch "Session is not expired after specified time period " New topic
Author

Session is not expired after specified time period

Raghu Sha
Ranch Hand

Joined: Feb 02, 2013
Posts: 118
After session got expired, it is not redirect to specified page.



web.xml



It is not valdating inside IF condition.
Please suggest

Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 971
    
  10

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

Joined: Feb 02, 2013
Posts: 118
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

Joined: Jul 31, 2012
Posts: 11
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

Joined: Feb 02, 2013
Posts: 118
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

Joined: Sep 03, 2013
Posts: 33

i think the session is not invalidated.....did you debug and check for the values??


SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session is not expired after specified time period
 
Similar Threads
Why my SipServlet throwing "SipApplicationSession is not valid." exception ?
time out period defined by the servlet container?
Problem with session timeout
how to handle session timeout
session data in sessionDestroyed method