reading security roles in web.xml from within servlet

Y

yoshi_76

hi there

we have defined a secure area in our webapplication. the
authentication is done via tomcat servlet container. this meas, we
have defined all roles with access right in the web.xml file
...
<security-role>
<role-name>admin</role-name>
</security-role>
<security-role>
<role-name>specialUser</role-name>
</security-role>
....
so far so good! it's all working just as expected.

on an administrator page I would like to show all the <security-roles>
which are defined in the web.xml file. is it possible to get them out
of the file from within a servlet?
i know, it would probably possible to read it using the java.io.
package, but since i can also get the value for the session timeout
with HttpSession.getMaxInactiveInterval I wonder, if there is a way to
read further elements from web.xml? But no servlet init params!

best regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top