File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Does <listener> element cannot be before <context-param> Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Does <listener> element cannot be before <context-param>" Watch "Does <listener> element cannot be before <context-param>" New topic
Author

Does <listener> element cannot be before <context-param>

Maciek Mike
Greenhorn

Joined: Feb 03, 2010
Posts: 22
Hi I'm preparing for SCWCD.

In one of mock questions is mentioned that <listener> element cannot be before <context-param> in web.xml.
I think that is not true. Am I right?


SCJP 5.0 (94%), SCJD (388/400), SCWCD (97%)
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9090

I think the order used to matter in earlier versions of Servlets where the web.xml was validated against a DTD, this is however no longer applicable...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Luis Centeno
Ranch Hand

Joined: Jul 31, 2009
Posts: 46
I think the order used to matter in earlier versions of Servlets where the web.xml was validated against a DTD, this is however no longer applicable...


This is correct...I tried deploying the following...



...and there was no problem, listener perfectly worked.

Hope this will help you...regards


SCJP 6 | SCWCD 5
Maciek Mike
Greenhorn

Joined: Feb 03, 2010
Posts: 22
many thanks, it helped a lot :-)
 
 
subject: Does <listener> element cannot be before <context-param>
 
Threads others viewed
EJB injection nullpointer and jsf grammar not found
Deployment Exception
ELResolvers not registered with the JSP container
Regarding order of elements in web.xml
Doubt in ServletContextListener
developer file tools