2 Replies Latest reply on Oct 18, 2002 10:51 PM by Trung Le

    Element "web-app" does not allow "servlet"

    Trung Le Newbie

      I started to learn JBoss (3.0.0) by creating a simple application. Here is the structure of my marriage.war file
      - index.jsp
      0 WEB-INF
      - web.xml
      0 classes
      0 my
      0 forum
      - MarriageHandler
      When I put this war file under {jboss.deploy} folder, I've got the following error:
      16:16:56,640 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
      .scanner.URLDeploymentScanner$DeployedURL@854593c5{ url=file:/D:/jboss-3.0.0/ser
      ver/default/deploy/marriage.war, deployedLastModified=1034930670021 }
      org.jboss.deployment.DeploymentException: Parse error on jar:file:/D:/jboss-3.0.
      : org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet" here
      .; - nested throwable: (java.io.IOException: Parse error on jar:file:/D:/jboss-3
      r!/: org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet" h
      at org.jboss.jetty.Jetty.deploy(Jetty.java:423)

      How can this happen? Apparently, servlet is a subtag in web-app ? Can the parser get a wrong dtd? My web.xml is pretty simple with only 1 declaration for MarriageHandler servlet

      Hope someone can help!!! Thanks in advance