Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Order Of Elements in Deployment Descriptor.

 
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.
 
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic