aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Practice exam question 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Practice exam question" Watch "Practice exam question" New topic
Author

Practice exam question

john marc almazan
Greenhorn

Joined: Feb 09, 2007
Posts: 3
hi guys, please help me answer this question.

web.xml:

<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>com.MyServlet</servlet-class>
<security-role-ref>
<role-name>manager</role-name>
<role-link>supervisor</role-link>
</security-role-ref>
</servlet>

//assume there is role name define for supervisor

Which of the following statements are correct?

A. The servlet code should use "manager" as a parameter in
request.isUserInRole() method.

B. The servlet code can use "manager" or "supervisor" as a
parameter in request.isUserInRole() method.

My answer is letter B because even though you have manager(a fake name) which map to supervisor(original name), there is no conflict between the two names so you can still use both names.

what do you think guys?


John Marc Almazan<br />-------------------<br />SCWCD, SCJP 5.0, CCNA
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Practice exam question
 
Similar Threads
role-link
Doubt regarding request.isUserInRole()
[jdiscuss][mock][question]
doubt in security role ref
isUserInRole() doubt