Is there a way to specify negative mappings in web.xml? For example, I want to set a filter for ALL requests EXCEPT those matching ‘/public/*‘.
Is there a way to specify negative mappings in web.xml ? For example, I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, that’s not possible. You’d have to do the URL pattern matching yourself inside the
doFilter()method. Map the filter on/*and do the following job:or when there’s actually a context path: