GIAC
GSSP-JAVA · Question #230
GSSP-JAVA Question #230: Real Exam Question with Answer & Explanation
The correct answer is B. request.isUserInRole("Manager");. See the full explanation below for the reasoning.
Question
Mark works as a Programmer for InfoTech Inc. He develops the following deployment descriptor code. <web-app . . . .> <display-name>A Secure Application</display-name><servlet> ... <security-role-ref > <role-name>Manager</role-name> <role-link>Admin</role-link> </security-role-ref> </servlet> <security-role> <role-name>Programmer</role-name> </security-role> <security-role> <role-name>Admin</role-name> </security-role> <security-role> <role-name>Employee</role-name> </security-role> </web-app> Which of the following is a valid isUserInRole() method call that can be made if request is the HttpServletRequest request?
Options
- Arequest.isUserInRole("Programmer");
- Brequest.isUserInRole("Manager");
- Crequest.isUserInRole("Admin");
- Drequest.isUserInRole("Employee");
Community Discussion
No community discussion yet for this question.