File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DD doubt

 
Parth Twari
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements are true?

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


 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

E. Yes, it should be lower-case.
 
Parth Twari
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So.. what shall I mark if B type of option comes in the exam?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parth Twari wrote:So.. what shall I mark if B type of option comes in the exam?

For servlets 2.4, a web application has a web.xml. (but there are good chances that you won't see that question at the exam )
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2171
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)

    For sure you won't be asked this on the exam...

    Regards,
    Frits
     
    Parth Twari
    Ranch Hand
    Posts: 163
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    ok.. thanks..
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic