File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts and Filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and Filters" Watch "Struts and Filters" New topic

Struts and Filters

Andy Deighton
Ranch Hand

Joined: Apr 01, 2003
Posts: 39
I'm using a LoginFilter implementation ensures a user logs in before they can proceed to a particular URL that happens to be a Struts Action.
They click on an HREF like: "/doSomething.action?param=1234". The LoginFilter then checks for a session attribute and if it's not there, assumes the user hasn't logged in and forwards them to the login page. Once they have logged in, the original URL is attempted to be directed to. But this is where the problem lies.
Once in the LoginFilter class, I need to store the original URL the user clicked on. However, I can retrieve as much as "/doSomething.action" but that's it. I can't access the parameters in the URI. request.getQueryString() just answers null.
Any ideas?
Using Struts 1.1, Tomcat 4.1.27.
I agree. Here's the link:
subject: Struts and Filters
It's not a secret anymore!