aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Interpreting web.xml" Watch "Interpreting web.xml" New topic
Author

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..

Thanks

Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 606

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 - http://en.wikipedia.org/wiki/XML_namespace#Namespaces_in_APIs_and_XML_object_models
XML Schema - http://www.w3schools.com/schema/schema_why.asp

The actual schema for the Servlet 2.5 spec is @ xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
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: 797

@ 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: http://aspose.com/file-tools
 
subject: Interpreting web.xml