• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Servlet Filter problems  RSS feed

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!