• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Filter Problem

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try changing

to
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic