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

Order Of Elements in Deployment Descriptor.

 
Hanuma Deepak Muvvala
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I wrote the mock exam in javaranch I found a question
<web-app>
<servlet>
.....
</servlet>
<listener>
<listener-class>com.javaranch.LogListener</listener-class>
</listener>
</web-app>

The above entry in the Deployment Descriptor(DD) will result in which of the following?

I selected the answer that a new listener class will be registered, but they gave the answer like this DD is wrong and the reason is "The ordering of the DD is listener then servlet." . Is it true? listeners should come first and then servlets? Please explain me.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ordering for the top level elements really dosn't matter with the 2.4 version of the DTD.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This mock is for version 2.3. It is not true anymore, as the ordering does not matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic