You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Johnny Cui <jo...@yahoo.com> on 2002/11/12 07:30:17 UTC

filter doesn't work at Tomcat4.1.12!?



Hi all,

I am trying to deploy a filter to my application in Tomcat 4.1.12, since the
code for filter is a sample code from reference book and I do exactly to the
web.xml for my application, however , the filter did not work.

Does anyone had experience in deploy filters on Tomcat4.1.12?
Does Tomcat 4.1.12 support filters?or it need some special configuration?

thanks for your attention.

Johnny


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: filter doesn't work at Tomcat4.1.12!?

Posted by Jacob Kjome <ho...@visi.com>.
Hi Johnny,

Based on the limited info you provided, I can't point to your exact 
problem, but there are a few general things to check to make sure you have 
configured properly.

Make sure that you have your filter defined and provide a mapping for it 
such as this:

<filter>
     <filter-name>My Filter</filter-name>
     <filter-class>org.mypackage.MyFilter</filter-class>
</filter>

<filter-mapping>
     <filter-name>My Filter</filter-name>
     <url-pattern>/*</url-pattern>
</filter-mapping>

Also, remember that the web.xml is order specific.  For instance, your 
filter and filter-mapping elements must come before your servlet and 
servlet-mapping elements and so on....

If you have this done properly, the next thing to do is to set up a logger 
in your filter (or use a remote debugger) to make sure your filter is 
actually running.

Other than that, is your application getting deployed and running properly 
otherwise?  If so, that would limit your search to the above 
recommendations.  Otherwise, you should try to get your app running 
properly and then try the above recommendations.

Jake

At 01:30 AM 11/12/2002 -0500, you wrote:



>Hi all,
>
>I am trying to deploy a filter to my application in Tomcat 4.1.12, since the
>code for filter is a sample code from reference book and I do exactly to the
>web.xml for my application, however , the filter did not work.
>
>Does anyone had experience in deploy filters on Tomcat4.1.12?
>Does Tomcat 4.1.12 support filters?or it need some special configuration?
>
>thanks for your attention.
>
>Johnny
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>