aspose file tools
The moose likes Security and the fly likes Getting the list of roles defined in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "Getting the list of roles defined in web.xml" Watch "Getting the list of roles defined in web.xml" New topic
Author

Getting the list of roles defined in web.xml

Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4118
    
    2

Apart from reading and parsing the web.xml, is there a way to get the list of roles defined under the <auth-constraint> element in web.xml?
I want to avoid hard-coding role names in my application. If I could get the list and iterate over it, I can write my additional role-based checking/processing code just once, keeping all the variables as properties in an application config file. I could put the list of roles in the application config file as well but that would mean that we would have to remember to change both web.xml and appconfig.properties when a new role is created (yeah, I know about comments but there's no guarantee that everyone reads them).
I've waded through the JavaDocs and Googled but found no joy and would appreciate if someone could point me in the right direction, even if it's to say that I'm way out in left field on this.
TIA


Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting the list of roles defined in web.xml
 
Similar Threads
Using weblogic security roles in authentication: weblogic 9
Using weblogic security roles in authentication: weblogic 9
HTTP Status 403 Access to the requested resource has been denied
Question on web-app security
Getting defined security-roles programatically