Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

WEB-INF and web.xml  RSS feed

 
ramchander yshetti
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai
what is mean by WEB-INF why it has be created in servlet.
WEB-INF stands for what.
what is the reason to mention WEB-INF like this

web.xml
what is mean by web.xml
what it does. explain.........
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai
what is mean by WEB-INF why it has be created in servlet.
WEB-INF stands for what.
what is the reason to mention WEB-INF like this

web.xml
what is mean by web.xml
what it does. explain.........


Thats what the specification says the name should be.
May be WEB-INF means Webapplication information..

secondly it is not created in the servlet, it is created for the web app.

Try placing an empty directory in the tomcat's webapps with all your
jsp's but without WEB-INF or WEB-INF/web.xml.
 
Amit Kumargupta
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure this is correct information or not....

Web applications use a standard directory structure defined in the J2EE specification.
Each Web application contains WEB-INF directory.This directory, created automatically during application creation, contains metadata about the application.

A web.xml deployment descriptor, which is a J2EE standard XML document that describes the contents of a WAR file.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This directory, created automatically during application creation


It is not created automatically, you must be using a wizard.

A web.xml deployment descriptor, which is a J2EE standard XML document that describes the contents of a WAR file.


What is a J2EE standard XML document?

It is a descriptor for the web application not the war file.
war is just and archive of the web application.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should download and read the Servlet Specification. Everything is spelled out there.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Amol Nayak:


Try placing an empty directory in the tomcat's webapps with all your
jsp's but without WEB-INF or WEB-INF/web.xml.


Tomcat will ignore this directory.
It doesn't require a deployment descriptor (web.xml) but it does require a WEB-INF directory in order for it to be considered a web application.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. It considers a default if now web.xml is there.

But if no WEB-INF is there it wont be considered as web application.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!