• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

ServletFilter not being called

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could someone tell me what is wrong with the following web.xml entry?
I want my ServletFilter to be called for every HttpRequest of any servlet or any JSP page but it is definitely not getting called for servlets in one specific scenario ... when the HttpSession is dead.
When the HttpSession is alive it seems to work.
However, if I issue a request from a page on my browser that has been left sitting for a while it seems to bypass the filter and go directly to the servlet which causes my application to crash.

I am perplexed at how to solve this problem and would be very grateful if anyone who understands Tomcat could tell me how to FORCE tomcat to use the filter in all circumstances.



 
Ranch Hand
Posts: 56
Eclipse IDE Postgres Database Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check your DD syntax.

replace this: <servlet-name>*</servlet-name>

with: <url-pattern>/*</url-pattern>
 
Alex Ryan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much Charles.
You were absolutely right.
This solved my problem.
VERY much appreciated.
Good karma to you.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic