Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filter invocation

 
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?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!