wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes <Security-role> in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "<Security-role> in web.xml" Watch "<Security-role> in web.xml" New topic
Author

<Security-role> in web.xml

Daniel Rutledge
Greenhorn

Joined: Aug 04, 2008
Posts: 10
Can <security-role> have more than one <role-name> in web.xml according to the current j2ee specification? I've seen different answers in different books and I can't seem to find a correct documentation online. Thank you, Dan.
Hasnain Javed Khan
Ranch Hand

Joined: Nov 23, 2007
Posts: 73
Hello Daniel,

Daniel Rutledge wrote:Can <security-role> have more than one <role-name> in web.xml according to the current j2ee specification? I've seen different answers in different books and I
can't seem to find a correct documentation online. Thank you, Dan.


you can find the Specs for Servlet 2.4 here Spec Link

You can refer to chapter SRV.13 Deployment Descriptor. As far as I understood, you can have multiple <security-role> elements but only one <role-name> element with in each <security-role> element (correct me if I'm wrong)

Hope that helps.

Kind Regards.
Hasnain.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

A security-constraint element can contain zero or one auth-constraint element, but the auth-constraint element can contain zero to many role-name elements...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: <Security-role> in web.xml