• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are the possible parent element of role-name?

 
Kathy Wang
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javaranch mock exam question NO.24
Which is a correct entry in the Deployment Descriptor for role-name used in the security-constraints placed on your webapp.
1)<web-app>
<security-role>
<constraint-name>Manager</constraint-name>
<security-role>
....
2)<web-app>
<security-role>
<role-name>Manager</role-name>
<security-role>
....
3)<web-app>
<security-constraint>
<role-name>Manager</role-name>
<security-constraint>
....
The correct answer is 2).
According to servlet spec. 12.3 the parent element of <role-name> is <security-role-ref>; Also in Alx Dark's note 6.2, the parent element is <auth-constraint>. Can anyone please tell me where I can find a reference to this question? Or can I say this question is wrong? Any of your input is highly appreciated!
 
Stefan Zoerner
Author
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
According to the DTD of the Deployment Descriptor of Servlet 2.3, and especially the comment for the role-name element, this element is used in
- auth-constraint
- run-as
- security-role
- security-rol-ref
Greetings from Hamburg,
Stefan
 
Kathy Wang
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stefan! Got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic