GSSP-JAVA · Question #14
You work as a Programmer for InfoTech Inc and develop the following two <security-constraint> declarations. <security-constraint> <web-resource-collection>…
The correct answer is A. Nobody is allowed to access the specified resources. See the full explanation below for the reasoning.
Question
You work as a Programmer for InfoTech Inc and develop the following two <security-constraint> declarations. <security-constraint> <web-resource-collection> <web-resource-name>Manager</web-resource-name> <url-pattern>/acme/Manager/</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint/> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>Manager</web-resource-name> <url-pattern>/acme/Manager/</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>Manager</role-name> </auth-constraint> </security-constraint> Which of the following statements is true about the <auth-constraint> in the code given above?
Options
- ANobody is allowed to access the specified resources.
- BOnly Manager is allowed to access the specified resources.
- CThe first <security-constraint> element declaration is incorrect.
- DIt is not possible to define the multiple security constraint on a single resource.
How the community answered
(54 responses)- A81% (44)
- B6% (3)
- C2% (1)
- D11% (6)
Community Discussion
No community discussion yet for this question.