I believe that the order of tage in the DD web.xml is order specific. I read somewhere that the following order be followed: filter, listeners, servlets and their mapping, session-config, welcome-file-list etc
But, surprisingly the listener tag is working fine even ferore servlet and server-mapping elemnets and also after them. How can this be true?
It also depends upon what version of the Servlet Specification your deployment descriptor is using. The ordering rules of elements using the Servlets 2.3 DTD will be different than using the Servlets 2.4 XML Schema.
If you read my first post in this topic, you will have noted that Servlets 2.4 does not use a DTD; it uses an XML Schema.
You can find the correct syntax in the Servlet Specification. You do have it handy on your desk, don't you?
Joined: Jan 26, 2006
Hi Bear, Thanks for posting again!
If you read my first post in this topic, you will have noted that Servlets 2.4 does not use a DTD; it uses an XML Schema
What's the difference between a DTD and an XML schema.My apologies, if i'm sounding too novice here.
In short, how can I get to see the error message on the console window if I precede servlet or servlet-mapping element(s) before the lostener element? I'm using jakarta-tomcat-5.0.28 and, have already posted the contents of web.xml file?
Any help shall be highly appreciated. Thanks, Reema
Joined: Jan 13, 2006
I think everything is depends on your servlet conatiner. I am using websphere and getting error with servlet 2.3
If you move your listener element after the servlet then you will get error message.