Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interpreting web.xml

 
Jayavardhan geepi
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ....
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Sam
Links are helpful
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic