This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet Filter problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
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://aspose.com/file-tools
 
subject: Servlet Filter problems
 
Similar Threads
LoginFilter & j_security_check
HttpServletRequest equivalent on html page
custom tag help
Simple login filter causing issues
User filter