File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Interpreting web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Interpreting web.xml" Watch "Interpreting web.xml" New topic

Interpreting web.xml

Jayavardhan geepi
Ranch Hand

Joined: Jul 21, 2010
Posts: 66
Hi, I thought this is the close to right place to post this thread. Here I go..

I need to understand top-level element of deployment descriptor web.xml.
(I read that, namespaces are to avoid conflicts of element names. Fine. And the namespace value is just treated as string(even if it is a URI) by XML Parser. Fine?)
See the below.

While working with eclipse for Ctrl+Space it gives the possible elements and validates it.
Will it go to that URI every time or what is the deal here.

I really appreciate anybody explaining each element of the above code..


Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 607

I am going to post a few links in answer to your question. Its not a direct answer, but then I think its a pretty though question, not many people (including me) really understand or care about what the top-level element of deployment descriptor are ...

To understand some basics you need to dive a bit deeper into XML name spaces and XSD,

Namespaces -
XML Schema -

The actual schema for the Servlet 2.5 spec is @ xmlns:web=""
hit the link in the browser and you should see the XSD (XML Schema)

Advice - If you new to programming leave those elements out as what is explained 'bunch of strings that you need to add to yu web-xml' ... as you grow and work with other stuff (XML, XQuery, Web-Services) you'll come to understand those thing in detail. As a web-developer going into the details is kinda of an over kill ....

Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 802

@ Sam
Links are helpful

SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
I agree. Here's the link:
subject: Interpreting web.xml
It's not a secret anymore!