"/*" works for the first filter and returns the index.html underneath my
context name, "/f2/*" calls the second filter, but does not find the
index.html. Does it look someplace else by calling it this way?


-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml <filter> config



The URL patterns in your filter mappings are not valid patterns.  Try
"/*" for the first filter "/f2/*" for the second filter.  Then, your URLs
would be processed like this:

http://localhost:8080/{mycontext}/index.html --> filtered by "Filter"
http://localhost:8080/{mycontext}/f2/index.html --> filtered by
  "Filter2" and then "Filter"

Craig


On Thu, 17 Jan 2002, Grobe, Gary wrote:

> Date: Thu, 17 Jan 2002 17:12:28 -0600
> From: "Grobe, Gary" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: web.xml <filter> config
>
>
> How do I get ...
> http://localhost/{mycontext} to point to Filter (default filter)
> and ... http://localhost/{myContext}/f2 to point to Filter2?
>
> I've been having problems calling Filter2. I want both filters to operate
on
> the same file ... so if i just type in http://localhost/myContext , then
> index.html file gets Filter, same for Filter2 if I append f1 to that. The
> response stream that both filters operate on must come from the same files
> (i.e. index.html, etc...).
>
>    <filter>
>       <filter-name>Filter2</filter-name>
>       <display-name>Filter2</display-name>
>       <filter-class>control.filter.Filter2</filter-class>
>    </filter>
>
>    <filter>
>       <filter-name>Filter</filter-name>
>       <display-name>Filter</display-name>
>       <filter-class>control.filter.Filter</filter-class>
>    </filter>
>
>    <filter-mapping>
>       <filter-name>Filter2</filter-name>
>       <url-pattern>/f2*</url-pattern>
>    </filter-mapping>
>
>    <filter-mapping>
>       <filter-name>Filter</filter-name>
>       <url-pattern>/f1*</url-pattern>
>    </filter-mapping>
>
> Any help much appreciated.
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to