tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Scheuerer <tabalo...@hispeed.ch>
Subject Re: cannot get Filters to work with Tomcat 5.0.16
Date Tue, 06 Jan 2004 16:46:36 GMT
Shapira, Yoav wrote:

> Howdy,
> OK, now that's the 3rd different version of the filter elements in your
> web.xml ;)  You shouldn't have both servlet-name and url-pattern
> children of filter-mapping, only one of them.

I tried to add the filters with the Struts Studio Web Deployment Editor just as 
another test. It's quite interesting: Struts Studio tells me that <servlet-name> 
is required. But in the DTD it says <servlet-url> OR <servlet-name>. So i guess

that's a bug in Struts Studio. It also put the empty <servlet-name> element 
there although left the field blank...

Anyway, I tried it with the correct version like this
<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>




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


Mime
View raw message