reading security roles in web.xml from within servlet

Discussion in 'Java' started by yoshi_76@yahoo.com, Feb 13, 2007.

  1. Guest

    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
     
    , Feb 13, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. circuit_breaker
    Replies:
    2
    Views:
    2,018
    Jack Jia
    Apr 4, 2004
  2. ppcguy
    Replies:
    1
    Views:
    611
    Andrea Desole
    Aug 8, 2005
  3. Nathan Sokalski
    Replies:
    2
    Views:
    475
    Nathan Sokalski
    Aug 5, 2008
  4. Nathan Sokalski
    Replies:
    2
    Views:
    1,594
    Nathan Sokalski
    Aug 9, 2008
  5. Jéjé
    Replies:
    0
    Views:
    239
    Jéjé
    Sep 27, 2005
Loading...

Share This Page