Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: cannot get Filters to work with Tomcat 5.0.16

Patrick Scheuerer

2004-01-06

Replies:

Shapira, Yoav wrote:

> Howdy,
> Your first filter-mapping is mapping to a servlet-name /*??  Either
> put a defined servlet name there or map to url-pattern /*.


I'll try copy/paste this time. Here's the filter declaration:

<filter>
  <filter-name>UserFilter</filter-name>
  <filter-class>ch.ctc.support.common.UserFilter</filter-class>
</filter>

<filter>
  <filter-name>AdminFilter</filter-name>
  <filter-class>ch.ctc.support.common.AdminFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>UserFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
  <filter-name>AdminFilter</filter-name>
  <url-pattern>/admin/*</url-pattern>
</filter-mapping>

I want every requets to go through the UserFilter and every request to
/execute/admin/* (it's a Struts app) through the AdminFilter.

I can't see what's wrong.....

Patrick



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.