Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Servlet Filter problems

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings,

I am trying to use a servlet filter to detect for session timeout in order to redirect back to the login page.

Question 1. how to capture the HTTP page they were 'on' (which I assume will be in the history) when the session expired in order to bring tham back after they log in?

Question 2. In Filter Chaining, how do I specify multiple resources in the web.xml, to avoid looking at .gif, .jpg, etc.

Here's the initial Filter:




AND the web.xml:



Am I in the BallPark?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Question 1. how to capture the HTTP page they were 'on' (which I assume will be in the history) when the session expired in order to bring tham back after they log in?


What history?
Why not just store the URL of the page they were requesting and bring them back to that one after they log in?



Question 2. In Filter Chaining, how do I specify multiple resources in the web.xml, to avoid looking at .gif, .jpg, etc.



The web.xml that you posted looks like it will do just that.
You're filtering requests for servlets and JSPs.
reply
    Bookmark Topic Watch Topic
  • New Topic