exclude filter from specific pages
843840Jan 23 2003 — edited Jan 23 2003What is the best way to exclude a filter from a specific resource? I have two JSPs that should not have my Authentication filter run on them, but the rest should.
Two ideas came to my mind:
1. Make a filter to disable the Authentication filter and map it to the two URLs that should not be authenticated. This seems like an inelegant workaround at best, and I'm hoping it's not the best way to do it.
2. Write a URL-mapping for Authentication filter for every resource in my webapp except those two. This also seems kind of shortsighted, and a pain to update whenever I add a new JSP or servlet.
Any advice?