Abhishek Dhote
Abhishek Dhote

Reputation: 1648

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

Is is possible to have NOT condition as a value for url-mapping for servlet-filter? Ex: I want to filter all the requests 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.

Upvotes: 3

Views: 490

Answers (1)

Bozho
Bozho

Reputation: 597382

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).

Upvotes: 7

Related Questions