-
1. Re: web.xml parse error
wbuford Feb 27, 2002 1:41 AM (in response to huangyufu)I am also migrating a web app from Tomcat 3.2.3 to JBoss 2.4.4 + Tomcat 4.0. Everything work fine in the stand alone Tomcat 3.2.3 version. With JBoss+Tomcat I encounter web.xml parse errors. The web.xml file has several and <servlet-mapping> elements. Originally, I listed all of the elements and followed them with all of the <servlet-mapping> elements. The parse error occured on the first <servlet-mapping> element. If I comment out the <servlet-mapping> elements, the web.xml file parses correctly. If I order the and <servlet-mapping> elements in pairs, the first pair parses correctly but a parse error occurs at the beginning of the secod pair:
[INFO,Default] PARSE error at line 41 column -1
[INFO,Default] org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet" here.
[ERROR,EmbeddedCatalinaServiceSX] ContextConfig[/myservlet] Parse error in application web.xml
org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet" here.
The DOCTYPE is declared correctly to reflect Servlet spec 2.3.
Thanks for your help.