GSNA · Question #208
Which of the following statements about the <web-resource-collection> element are true?
The correct answer is A. It has <web-resource-name> as one of its sub-elements. D. It is a sub-element of the <security-constraint> element. The <web-resource-collection> element is a sub-element of the <security- constraint> element and specifies the resources that will be constrained. Each <security- constraint> element should have one or more <web-resource-collection> sub-elements. The syntax of the…
Question
Which of the following statements about the <web-resource-collection> element are true?
Options
- AIt has <web-resource-name> as one of its sub-elements.
- BIf there is no <http-method> sub-element, no HTTP method will be constrained.
- CIt can have at the most one <url-pattern> sub-element.
- DIt is a sub-element of the <security-constraint> element.
How the community answered
(56 responses)- A80% (45)
- B5% (3)
- C14% (8)
Explanation
The <web-resource-collection> element is a sub-element of the <security- constraint> element and specifies the resources that will be constrained. Each <security- constraint> element should have one or more <web-resource-collection> sub-elements. The syntax of the <web-resource- collection> element is as follows: <security-constraint> <web- resource-collection> <web- resource-name>ResourceName</web-resource-name> <http- method>GET</http-method> <url- pattern>PatternName</url-pattern> </web-resource-collection> </security-constraint> The sub- elements of the <web-resource-collection> element are as follows: <web-resource-name>: This mandatory sub-element is the name of the Web resource collection. <description>: This is an optional sub-element that specifies a text description of the current security constraint. <http-method>: This optional sub-element specifies HTTP methods that are constrained. <url-pattern>: This sub-element specifies the URL to which the security constraint applies. There should be atleast one url-pattern element; otherwise, the <web-resource- collection> will be ignored. Answer: C is incorrect. The <web-resource-collection> element can have any number of <url- pattern> sub-elements. Answer: B is incorrect. If there is no <http-method> sub- element, no HTTP methods will be
Topics
Community Discussion
No community discussion yet for this question.