• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic