tomcat过滤url模式问题
你好 我有一个tomcat服务器版本5.5.12 我正在使用过滤器,问题是对于某些文件,过滤器有效,而对于其他文件则无效,例如对于路径 /software/files/generator.7z 它有效,但对于路径 >/software/files/tokenizer.7z 事实并非如此。 知道问题是什么吗? 谢谢。
这是 web.xml 文件中我的过滤器标签。
<filter>
<filter-name>LogFilter</filter-name>
<filter-class>servlet.filters.LogFilter</filter-class>
<init-param>
<param-name>test-param</param-name>
<param-value>This parameter is for testing.</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>LogFilter</filter-name>
<url-pattern>/software/files/*</url-pattern>
</filter-mapping>
Hi
i have a tomcat server version 5.5.12
and i am using a filter, the problem is that for some files the filter works and for other it doesnt, for example for the path /software/files/generator.7z it works but for path /software/files/tokenizer.7z it doesnt.
any idea what is the probelm ?
thanks.
here is my filter tags in the web.xml file.
<filter>
<filter-name>LogFilter</filter-name>
<filter-class>servlet.filters.LogFilter</filter-class>
<init-param>
<param-name>test-param</param-name>
<param-value>This parameter is for testing.</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>LogFilter</filter-name>
<url-pattern>/software/files/*</url-pattern>
</filter-mapping>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来不错。显然,它是从浏览器缓存请求的,而不是直接从网络服务器请求的。
清理浏览器缓存,或按 Ctrl+F5,或让服务器添加 响应标头,指示浏览器不缓存响应。
It looks fine. Apparently it was been requested from the browser cache instead of straight from the webserver.
Clean your browser cache, or do Ctrl+F5, or let the server add response headers which instructs the browser to not cache the response.