开发者

Can we have NOT condition in url-mapping for servlet-filter

开发者 https://www.devze.com 2023-01-31 18:02 出处:网络
Is is possible to have NOT condition as a value for url-mapping for servlet-filter? Ex: I want to filter all the r开发者_如何学Goequests that does not contain \".\" so lets consider I have a request l

Is is possible to have NOT condition as a value for url-mapping for servlet-filter? Ex: I want to filter all the r开发者_如何学Goequests that does not contain "." so lets consider I have a request like www.website.com/pages. This does not contain "." or ".html" so I want to filter all such request.


No, it is not possible. You can add this condition in your filter and do just chain.doFilter(req, resp) (i.e. skip the filter).

0

精彩评论

暂无评论...
验证码 换一张
取 消