aspose file tools
The moose likes Servlets and the fly likes Servlet Filter problems Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Servlet Filter problems" Watch "Servlet Filter problems" New topic
Author

Servlet Filter problems

Christopher McCauley
Greenhorn

Joined: Jan 03, 2005
Posts: 27
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?


JCM<br />good at cookin'
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Servlet Filter problems
 
Similar Threads
HttpServletRequest equivalent on html page
custom tag help
LoginFilter & j_security_check
User filter
Simple login filter causing issues