Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sequence in web.xml

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the sequence of elements in web.xml matters ? I mean if i write
(<servlet> and then <servlet-mapping> OR (<servlet-mapping> and then <servlet> will it give me error ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Order does not matter since Servlets 2.4.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sequence of elements doesn't matter but ordering of their sub-elements matters.

<context-param>
<param-value>A </param-value>
<param-name>B </param-name>
</context-param>

This will give error...
Moreover do we expect these types of questions on exams... I meam questions related to element details ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic