Multiple choice technology programming languages

Which of the following are true statements about the deployment descriptor for a web application?

  1. At least one <servlet> element must be present.

  2. <welcome-file> is a child element of <welcome-file-list>.

  3. <web-application> is the root element

  4. <servlet> elements must all be declared before <servlet-mapping> elements.

  5. At least one element must be present.

Reveal answer Fill a bubble to check yourself
B,E Correct answer
Explanation

In Java web.xml deployment descriptors: (A) is false - servlet elements are optional. (B) is true - is a child of . (C) is false - the root element is , not . (D) is false - servlet and servlet-mapping elements can be in any order. (E) is true - at least one element must be present. The correct answers are B and E.