如何过滤特定目录下的某类文件?

03-09-09 yehs220
比如要过滤/dir下的*.jsp文件

下面这样我试过不行,在tomcat4.1下

<filter-mapping>
    <filter-name>aFilter</filter-name>
    <url-pattern>/dir/*.jsp</url-pattern>
</filter-mapping>
<p>

xok
2003-09-10 05:59
(According to mighty google)

There are only four standard URL patterns (and this applies to servlet

mappings and security constraints as well as filter mappings):

* Exact match (/foo)

* Path match (/foo/*)

* Extension match (*.foo)

* Default servlet (/) which is useful only for servlet mappings

There is no legal syntax to say "all but this set of paths".

yehs220
2003-09-10 08:36
Thanks.

猜你喜欢