I've run into a situation in which I'd like to apply a filter to all *.do actions except one. Is there any way to do that short of adding every action as a URL mapping to the deployment descriptor.
For my particular case, I require that the user select the site he/she would like to administer before using my application. To do that, they go through an action called "setupsiteselection.do". I've created a Filter that will check to see if a site identifier is stored in the session or not. If it isn't, the user is redirected so that he/she selects a site before accessing the page. If it's there, the user simply goes on.
I want this filter to be applied to most of my JSP's and all of the actions except for the one I indicated previously. The JSP's aren't an issue - it's the actions that are giving me a headache. Anyone know of a good way to get around this - I don't want to add every individual action to the URL Mappings as there are dozens of actions in the application.
Originally posted by Jeanne Boyarsky: I would handle that by having the filter get called for all *.do actions. Then the filter can check the path and see if it was the one admin/setup action.
Thanks, Jeanne. That's the solution I had come up with and implemented, but I didn't really like putting the path into the filter code. It works, but I was wondering if someone had a better approach. That doesn't seem to be the case.