• 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 is not expired after specified time period

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 33
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think the session is not invalidated.....did you debug and check for the values??
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic