tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: filters
Date Thu, 08 Aug 2002 18:57:08 GMT


On Thu, 8 Aug 2002, Mario Krolo wrote:

> Date: Thu, 08 Aug 2002 14:18:28 -0400
> From: Mario Krolo <mkrolo@somanetworks.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: filters
>
> Hi,
>
> I have a few url patterns that I would like to
> filter (for example /aaaone,/aaatwo,/aaathree).
> They all start with the same three letters.
>
> If I do the following in my web.xml file my filter
> kicks in and everything works fine:
>
>     <filter-mapping>
>         <filter-name>MyFilter</filter-name>
>         <url-pattern>/aaaone</url-pattern>
>     </filter-mapping>
>
>     <filter-mapping>
>         <filter-name>MyFilter</filter-name>
>         <url-pattern>/aaatwo</url-pattern>
>     </filter-mapping>
>
>     <filter-mapping>
>         <filter-name>MyFilter</filter-name>
>         <url-pattern>/aaathree</url-pattern>
>     </filter-mapping>
>
> However, when I try
>
>     <filter-mapping>
>         <filter-name>MyFilter</filter-name>
>         <url-pattern>/aaa*</url-pattern>
>     </filter-mapping>
>
> my filter doesn't do anything.  It seems that
> the /aaa* pattern is wrong.
>
> I was wondering why and how can I get it to work
> with just one filter-mapping entry in web.xml.
>

You'd know that this wasn't legal syntax if you read the definition of
servlet and filter mapping patterns in the servlet spec :-).

  http://java.sun.com/products/servlet/download.html

> Thanks,
>
> Mario

Craig


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message