This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filter invocation  RSS feed

 
Anoopriya Muthuswaami
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFJS reads as "If the Container can�t locate the right resource for the request, the filter is never invoked".

But I had the following entry in web.xml
<filter>
<filter-name>LoginCheckFilter</filter-name>
<filter-class>example.LoginCheckFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>LoginCheckFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>

There are NO servlet mapping for *.do.

When I typed the following in brower, http://localhost:8080/ExampleWebProject/Test.do , I get the Http 404 error page(expected) but I can see the doFilter() being invoked.

Can someone clarify me on this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!