1 Reply Latest reply on Feb 27, 2002 1:41 AM by wbuford

    web.xml parse error

    huangyufu

      I'm migrating my web application from Tomcat standalone to JBoss+Tomcat. JBoss was installed successfully. For the application, it has parse error on web.xml. The <welcome-file-list> tag is ok. But not <context-param> (they are both embedded in <web-app>). The error message is as the following. Thank you for the help.

      [INFO,Default] org.xml.sax.SAXParseException: Element "web-app" does not allow "context-param" here.
      [ERROR,EmbeddedCatalinaServiceSX] ContextConfig[/waferstart] Parse error in application web.xml
      org.xml.sax.SAXParseException: Element "web-app" does not allow "context-param" here.
      at org.apache.crimson.parser.Parser2.error(Parser2.java:3086)
      at ....
      ....
      ....
      ....

        • 1. Re: web.xml parse error
          wbuford

          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.