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

listeners declaration: before or after servlet ?

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am reading contradictory things, and it is confusing me :
in version 2.4 of the servlets specification, do i have to declare listeners
before servlets in my description file web.xml ?
Does the order still matter ? Can it be before and after too ?

So, is this code correct ?
 
Chethan Verma
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Max,

servlet2_4 spec says
The sub elements under web-app can be in an arbitrary order in this version of
the specification
.
means order doesn't matter right?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, as Chethan says, order does not matter.
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, thanks for your feedback, that's what I read too but i still was not sure. I guess the contradictory comments I read referred to different servlets specifications versions.

Does anyone know the important tags in the SCWCD exam where order still matters though ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forget about 2.3, and focus on 2.4. The order of elements in web.xml does not matter.
I've already discusses in another thread that the order of listeners and the order of filters is still important :
http://www.coderanch.com/t/173372/java-Web-Component-SCWCD/certification/order-elements-web-xml
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic