• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WEB-INF and web.xml

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.........
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should download and read the Servlet Specification. Everything is spelled out there.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic