aspose file tools*
The moose likes Struts and the fly likes Filter Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Filter Problem" Watch "Filter Problem" New topic
Author

Filter Problem

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi All,

Good Day!!!

I implemented my custom filter so that when Session Times Out in the Server, user should be directed to another action class mapping that will
do some processing first before they are forwarded to another JSP.

But its causing an error at the browser.
javax.servlet.ServletException: No action config found for the specified url.

Here's my filter code. Upon checking that the session has already expired
I should be able to call the action mapping for /logoutAction.do.



I will be glad to hear pointers too if what I am doing is correct or should I just extend the RequestProcessor Class ?(As from what I have read in the Search FAQ's, though I dont know much about this). Thanks.


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Try changing

to


Merrill
Consultant, Sima Solutions
Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi Merill,

I tried what you have suggested but its giving me a 404 error. So I tried
changing this one from

response.sendRedirect("/logoutAction.do");


into

response.sendRedirect(request.getContextPath() + "/logoutAction.do");


and that did the trick. Thanks.


I am just wondering why forwarding to the request dispatcher did'nt work, whereas what we did was redirect using the response object and a new set of request and response object was generated and another trip to the browser..

But any way my problem was solved. Thanks again..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filter Problem
 
Similar Threads
Session Management with Ajax
Session out in Struts
redirect to other url from TilesRequestProcessor
Servlet - Urgent help required.
how to redirect to other URL ?