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

Element order in DD

 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it required to maintain element order in DD(web.xml)?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not with the 2.4 spec.

The order of certain elements may influence the way they are loaded/unloaded.
But it won't raise any deployment errors as it did in 2.3
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this quetion in Java Ranch mock ups.

<web-app ..>
....
<servlet>
...
</servlet>

<listener-class> com.test.javaranch.TestListener </listener-class>
</web-app>

Answer is : You will get " Parse Error " in DD.

In exam, did i need to select answer related to servlet 2.3 spec or servlet 2.4 spec.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For SCWCD 1.4 servlet 2.4 spec.
Thanks
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<context-param>

<param-value>Parameter Name</param-value>

<param-name>Parameter Value</param-name>

<context-param>


is this syntax is correct accroding to servlet spec 2.4?
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prabhu venkatachalam:
<context-param>

<param-value>Parameter Name</param-value>

<param-name>Parameter Value</param-name>

<context-param>


is this syntax is correct accroding to servlet spec 2.4?


In the above example the parameter value is given in the <param-name> and Parameter name is given in <param-value>. It looks typo.

If you look closely, in the web.xml Schema document, the order of the sub-elements, which are not directly under <web-app> is important. You can specify only top-order sub-elements in any order. If you does not define the sub-element in the order it is still a parsing error.


Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic