You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mario Krolo <mk...@somanetworks.com> on 2002/08/08 20:18:28 UTC
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.
Thanks,
Mario
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: filters
Posted by Cédric Viaud <ce...@matrasi-tls.fr>.
Hi,
according to the spec, i think it is normal. It is written that you can have
these mappings :
- begining with '/' and ending with '/*' is for path mapping (not your
case)
- begining with '*.' is for extension mapping (not your case)
- only '/' indicate defaut servlet of the application (not your case)
- all other strings are used for EXACT matches only (so it is your case
by default)
I'm sorry but i thing you can't mapp what you want.
Why doesn't change you calls wich are :"aaa********" by "********.aaa" so
you can map on '*.aaa'
That's what i do. I use a specific extension for mapping to the right
controler (servlet).
Regards,
Cédric
----- Original Message -----
From: "Mario Krolo" <mk...@somanetworks.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, August 08, 2002 8:18 PM
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.
>
> Thanks,
>
> Mario
>
> --
> 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: filters
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 8 Aug 2002, Mario Krolo wrote:
> Date: Thu, 08 Aug 2002 14:18:28 -0400
> From: Mario Krolo <mk...@somanetworks.com>
> Reply-To: Tomcat Users List <to...@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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: filters
Posted by Jacob Hookom <ho...@uwec.edu>.
You can bind it to /* and then when your servlet receives the request,
validate it against your own pattern, else pass it on.
> -----Original Message-----
> From: Mario Krolo [mailto:mkrolo@somanetworks.com]
> Sent: Thursday, August 08, 2002 1:18 PM
> 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.
>
> Thanks,
>
> Mario
>
> --
> To unsubscribe, e-mail: <mailto:tomcat-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-
> help@jakarta.apache.org>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>