aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes WAR File Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "WAR File Doubt" Watch "WAR File Doubt" New topic
Author

WAR File Doubt

Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
Which of the following statements is true?

A. A war file is an xml configuration file
B. a war file must contain a directory called META-INF
C. a war file can contain servlets but not jsp pages
D. a war file can contain servlets, jsp and other resources
E. The top directory of a war file is the document root of the application

Answer given in marcus mock: B,D,E

But I think B is wrong , a WAR must contain META-INF only when it is required to specify dependencies otherwise not required.
also I think E is wrong, not the top directory but the contents in the WAR file are unpackaged and become the root of web application.


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

Joined: Nov 24, 2005
Posts: 14688
    
  16

SRV.9.6 Web Application Archive File

Web applications can be packaged and signed into a Web ARchive format (WAR) file using the standard Java archive tools. When packaged into such a form, a META-INF directory will be present which contains information useful to Java archive tools.


[My Blog]
All roads lead to JavaRanch
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1734
    
  25

In normal circuimstances you will have both a META-INF and a WEB-INF dir in your war file although it is not mandated by the specs.

For the exam you won't get questions about the presence of these directories, and if you do, you should consider them to be there.

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: WAR File Doubt