You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Felipe Schnack <fe...@ritterdosreis.br> on 2002/08/14 15:21:17 UTC

filter

  I'm using Tomcat 4.0.4
  I'm trying to declare a filter in web.xml file, but it refuses to
work. Here is what I wrote:
  <filter>
    <filter-name>testFilter</filter-name>
    <filter-class>com.test.FilterTest</filter-name>
  </filter>
  When I start Tomcat it says my XML is invalid. What I'm doing wrong?

-- 

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
felipes@ritterdosreis.br
Fone/Fax.: (51)32303328


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


Re: filter

Posted by Felipe Schnack <fe...@ritterdosreis.br>.
  Yes, the order of mostly everything was wrong, thank you very much :-)
  Anyway, the tag thing was an typo.

On Wed, 2002-08-14 at 10:24, Mark O'Driscoll wrote:
> <filter-class>com.test.FilterTest</filter-name>
>                                                             ^^^^^^^^^^^ //
> should be </filter-class>
> Failing that, i'd have to see the error but my guess is that you have the
> order of things in your web.xml wrong.
> 
> <filter> tags should appear after <context-param> and before <listener>
> tags. See your dtd for more details. I use
> http://java.sun.com/web-app_2_3.dtd
> 
> ----- Original Message -----
> From: "Felipe Schnack" <fe...@ritterdosreis.br>
> To: <to...@jakarta.apache.org>
> Sent: Wednesday, August 14, 2002 2:21 PM
> Subject: filter
> 
> 
> >   I'm using Tomcat 4.0.4
> >   I'm trying to declare a filter in web.xml file, but it refuses to
> > work. Here is what I wrote:
> >   <filter>
> >     <filter-name>testFilter</filter-name>
> >     <filter-class>com.test.FilterTest</filter-name>
> >   </filter>
> >   When I start Tomcat it says my XML is invalid. What I'm doing wrong?
> >
> > --
> >
> > Felipe Schnack
> > Analista de Sistemas
> > felipes@ritterdosreis.br
> > Cel.: (51)91287530
> > Linux Counter #281893
> >
> > Faculdade Ritter dos Reis
> > www.ritterdosreis.br
> > felipes@ritterdosreis.br
> > Fone/Fax.: (51)32303328
> >
> >
> > --
> > 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>
> 
-- 

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
felipes@ritterdosreis.br
Fone/Fax.: (51)32303328


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


Re: filter

Posted by Mark O'Driscoll <ma...@eircom.net>.
<filter-class>com.test.FilterTest</filter-name>
                                                            ^^^^^^^^^^^ //
should be </filter-class>
Failing that, i'd have to see the error but my guess is that you have the
order of things in your web.xml wrong.

<filter> tags should appear after <context-param> and before <listener>
tags. See your dtd for more details. I use
http://java.sun.com/web-app_2_3.dtd

----- Original Message -----
From: "Felipe Schnack" <fe...@ritterdosreis.br>
To: <to...@jakarta.apache.org>
Sent: Wednesday, August 14, 2002 2:21 PM
Subject: filter


>   I'm using Tomcat 4.0.4
>   I'm trying to declare a filter in web.xml file, but it refuses to
> work. Here is what I wrote:
>   <filter>
>     <filter-name>testFilter</filter-name>
>     <filter-class>com.test.FilterTest</filter-name>
>   </filter>
>   When I start Tomcat it says my XML is invalid. What I'm doing wrong?
>
> --
>
> Felipe Schnack
> Analista de Sistemas
> felipes@ritterdosreis.br
> Cel.: (51)91287530
> Linux Counter #281893
>
> Faculdade Ritter dos Reis
> www.ritterdosreis.br
> felipes@ritterdosreis.br
> Fone/Fax.: (51)32303328
>
>
> --
> 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

Posted by Cédric Viaud <ce...@matrasi-tls.fr>.
    <filter-class>com.test.FilterTest</filter-name>

Your end tag dosen't fit your start tag.

change it to :
    <filter-class>com.test.FilterTest</filter-class>

regards,

  Cédric

----- Original Message -----
From: "Felipe Schnack" <fe...@ritterdosreis.br>
To: <to...@jakarta.apache.org>
Sent: Wednesday, August 14, 2002 3:21 PM
Subject: filter


>   I'm using Tomcat 4.0.4
>   I'm trying to declare a filter in web.xml file, but it refuses to
> work. Here is what I wrote:
>   <filter>
>     <filter-name>testFilter</filter-name>
>     <filter-class>com.test.FilterTest</filter-name>
>   </filter>
>   When I start Tomcat it says my XML is invalid. What I'm doing wrong?
>
> --
>
> Felipe Schnack
> Analista de Sistemas
> felipes@ritterdosreis.br
> Cel.: (51)91287530
> Linux Counter #281893
>
> Faculdade Ritter dos Reis
> www.ritterdosreis.br
> felipes@ritterdosreis.br
> Fone/Fax.: (51)32303328
>
>
> --
> 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

Posted by Capr1ce <ca...@capr1ce.co.uk>.
Hi, do you have the elements in the correct order as specified by the 
web.xml's DTD?
Refer to section 13.3 of the Servlet (2.3) spec.


At 10:21 AM 14/08/2002 -0300, you wrote:
>   I'm using Tomcat 4.0.4
>   I'm trying to declare a filter in web.xml file, but it refuses to
>work. Here is what I wrote:
>   <filter>
>     <filter-name>testFilter</filter-name>
>     <filter-class>com.test.FilterTest</filter-name>
>   </filter>
>   When I start Tomcat it says my XML is invalid. What I'm doing wrong?
>
>--
>
>Felipe Schnack
>Analista de Sistemas
>felipes@ritterdosreis.br
>Cel.: (51)91287530
>Linux Counter #281893
>
>Faculdade Ritter dos Reis
>www.ritterdosreis.br
>felipes@ritterdosreis.br
>Fone/Fax.: (51)32303328
>
>
>--
>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>