• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web.xml error

 
Ayman Nour
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone
i have created a class implementing ServletContextListener interface. and configured it in the web.xml this way
<listener>
<listener-class>package.ContextListener</listener-class>
</listener>
the thing is...it's working fine on Oracle 9i Container. BUT...when i deploy on TOmcat 4...i get a parse error saying..
"Element type "listener" must be declared"
i didn't even touch the web.xml when moving from oc4j to tomcat. it's even read only!!! what could that be? any clue?
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-Can you paste you <!DOCTYPE> element ? may be it is not finding the DTD !!!
(try removing this listener element from xml and see if you are getting error for any other element too)
-what is the position of the <listener> element in ur web.xml file? as as per DTD ... there is a sequence and its good to follow it !!!
-When are you getting this error?
 
Ryan Bailey
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to check to make sure that it is in the correct order. I'm sure you know that order does matter, but maybe the Oracle container doesn't care about the order of the <!ELEMENT web-app>
Post your web.xml file for this particular application and we'll have a look.
Cheers
Ryan
 
Ayman Nour
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well thank you guys
one of the comments about the doc-type made me notice that the generated headesr for the web.xml file i was using was using DTD web application 2.(2)
when i changed that to 2.3 everything worked correctly...
it seems that the auto generated web.xml from jdeveloper 9i is using 2.2 instead of 2.3 and the oracle container somehow manages it!!!
everything is working correctly now. except that i am trying to find a way to import the db2java.zip file (libarary for jdbc to db2) into tomcat!!!...and still struggeling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic