Is it possible to use reg-exp for <url-pattern>? If not, what is the best way to do this?
It's traditional to use the servlet mapping. For example "/myRoot/*". All servlet URLs begin with this mapping. It is good practice to not refer to JSPs directly, but through a servlet. But if you have loose JSPs, you could use a similar pattern to pick them up.
Bug, It would be great if you can let me know how your filter works? From where does it picks up the role access mappings etc etc..
Joined: Oct 15, 2004
Gavi, It checks for a valid session by checking for a session attribute that was assigned to the session when it was first created. The attribute assigned corresponds to the role of the user (when they logged in).
Jeanne, I already thought about making the url-pattern alike for servlets, it's just huge work because I have lots of servlets. Consider the jsp's that <a href= or <form action= to these servlets. If reg.exp. was available however, I could probably just say !(/images/ | /js/) and stuff.
Thanks for the reply!
author & internet detective