• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

which path is required in WAR file

 
Gorkal Raghavendra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i have one doubt regarding one question.

Which path is required to be present in a war file???
A /WEB-INF/web.xml
B /WEB-INF/classes
C./MANIFEST-INF
i think the answer is that web.xml must be present.
 
Irina Goble
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hints:
A web application might not use any Java classes.
MANIFEST-INF is a madeup name.
 
Kunal Jag
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
About web.xml
The servlet specification mandates the DD file- web.xml to be a part of every Web application. Please note that with Java EE 5, the Web application DD is optional for simple applications containing JSP pages and static files. If your web module does not contain any servlets, filter, or listener components then it does not need a DD.

About META-INF
When a Web application is deployed as a WAR, the container creates a directory called META-INF inside the document root, the META-INF contains dependencies and information useful to Java archive tools.

Regards,
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java EE 5, is it possible to deploy the war file without web.xml though it has only jsp files ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exam is about servlets 2.4, so be careful if you start messing with Servlets 2.5 specification.
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So , what should be the answer for the question mentioned ?

is it web.xml?
 
Kunal Jag
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exam is about servlets 2.4, so be careful if you start messing with Servlets 2.5 specification.


That's a very apt statement. In Servlets 2.4 spec, web.xml is a mandatory artifact. That said, it's always good to know about new changes in the spec.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by deepa raj:
So , what should be the answer for the question mentioned ?


A /WEB-INF/web.xml and

B /WEB-INF/classes


correct me ,if i am wrong
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic