aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes DD doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "DD doubt" Watch "DD doubt" New topic
Author

DD doubt

Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
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



Parth Tiwari
| Pursuing Bachelor of Engineering | OSUM Club Leader | SCJP 6 | SCWCD 5 |...
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.

[My Blog]
All roads lead to JavaRanch
Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
So.. what shall I mark if B type of option comes in the exam?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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
Bartender

Joined: Apr 07, 2010
Posts: 1696
    
  25

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

    Joined: Jan 20, 2010
    Posts: 163
    ok.. thanks..
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: DD doubt