GSSP-JAVA · Question #73
Which of the following statements are correct about the code given below? <security-constraint> <web-resource-collection> <web-resource-name>AccountServlet</web-resource-name> <description>This is…
The correct answer is B. If no http-method is specified in the web-resource-collection element, the security C. There should be at-least one url-pattern element otherwise, the <web-resource-collection> D. It is necessary that the web-resource-name must be specified in the web-resource-. See the full explanation below for the reasoning.
Question
Which of the following statements are correct about the code given below? <security-constraint> <web-resource-collection> <web-resource-name>AccountServlet</web-resource-name> <description>This is an Account Servlet.</description> <http-method>GET</http-method> <http-method>POST</http-method> <http-method>PUT</http-method> <http-method>DELETE</http-method> <url-pattern>acme/AccountServlet</url-pattern> </web-resource-collection> </security-constraint> Each correct answer represents a complete solution. Choose all that apply.
Options
- AThe delete http method is not allowed in the http-method element declaration.
- BIf no http-method is specified in the web-resource-collection element, the security
- CThere should be at-least one url-pattern element otherwise, the <web-resource-collection>
- DIt is necessary that the web-resource-name must be specified in the web-resource-
- EIt is not possible to define more than two http method in the web-resource-collection
- FIt is necessary that the web-resource-name must be specified in the url of the url-pattern
How the community answered
(68 responses)- A6% (4)
- B74% (50)
- E16% (11)
- F4% (3)
Community Discussion
No community discussion yet for this question.