A. A deployment descriptor is not mandatory for configuring and running a servlet.
B. A deployment descriptor is not mandatory for configuring and running a JSP page
C. The deployment descriptor consists of XHTML tags
D. The deployment descriptor consists of XML tags
E. The deployment descriptor must have the name WEB.XML
F. The deployment descriptor must have the name DEPLOY-XML Incorrect
From experience I got answers correct as given in Marcus mock as
B,D,E Given Explaination in mock about E: The deployment descriptor must be called WEB.XML (and that name is case sensitive) and must reside in the WEB-INF directory under the root of the web application
But cannot find A,B written in spec.
D is obvious.
About E i think name shall be in small case web.xml
| Pursuing Bachelor of Engineering | OSUM Club Leader | SCJP 6 | SCWCD 5 |...
A. You need some sort of mapping to be able to call a servlet, which is done via the deployment descriptor
B. Not sure where this statement comes from. I think that whether or not web.xml is mandatory is debatable. SRV.9.5 Directory Structure says :
The contents of the WEB-INF directory are:
- The /WEB-INF/web.xml deployment descriptor.
The servlets 2.5 specification clearly states that a web application is NOT required to contain a web.xml if it does NOT contain any
Servlet, Filter, or Listener components. But this exam is about servlets 2.4, so I can't agree with the answer.
The answer B consists about answering two questions:
1) Do you need a web.xml to configure a jsp
2) Do you need a web.xml to run a jsp
The answer to 1) is no, you don't need to configure your jsp files in the web.xml (although you can do it with a servlet element)
The answer to 2) is all about whether the war file must contain a WEB-INF dir (with a web.xml), this is not really clear from the specs (see this previous thread), and in tomcat it is possible to run web-app without a WEB-INF dir (only containing jsp-files)