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

WAR File Doubt

 
Parth Twari
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2167
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
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