4 Replies Latest reply on Jan 31, 2003 2:54 PM by Mick Knutson

    problems deploying an war archive

    Jose Carlos Meira e Silva Newbie

      When I deploy an war file with only one servlet in the web.xml file the Jboss 3.0.4 deploy ok, but when I add another servlet to the web.xml the Jboss gives the follows error:

      org.jboss.deployment.DeploymentException: Element "web-app" does not allow "serv
      let" here.; - nested throwable: (org.xml.sax.SAXParseException: Element "web-app
      " does not allow "servlet" here.)
      at org.jboss.jetty.Jetty.deploy(Jetty.java:436)
      at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:30
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

        • 1. Re: problems deploying an war archive
          Peter Doornbosch Apprentice

          Looks like an error in your web.xml to me. Check it with the dtd (see /doc/dtds) or attach it to your post so we can have a look.

          • 2. Re: problems deploying an war archive
            Michael Dinsmore Newbie

            I'm almost certain that's exactly what it is. Check your web.xml file and verify the order of the nodes in the XML document come in the right order.

            XML Spy can check your DTD for you before you deploy, or you can use some open source tools like Eclipse (http://www.eclipse.org) and a XML plug-in to do the job.

            • 3. Re: problems deploying an war archive
              Jose Carlos Meira e Silva Newbie

              Thank you. The problem was that.
              I have another problem with custom tag libs. I add


              to the web.xml and I put the TLD and classes in WEB-INF\tlds and WEB-INF\classes. When a jsp page try to access the tag library I receive the above message error.
              The reference in the jsp page is the next:
              <%@ taglib uri="/data" prefix="data"%>

              thanks in advance,
              Jose Carlos

              15:35:36,810 WARN [jbossweb] WARNING: Exception for /webcargas/ecPCargas.jsp
              org.apache.jasper.JasperException: File "/taglibdatas.tld" not found
              at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoIm
              at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoIm
              at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirecti
              at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspP
              at org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegat
              at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255)
              at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
              at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
              at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
              at org.apache.jasper.compiler.ParserController.parse(ParserController.ja
              at org.apache.jasper.compiler.Compiler.compile(Compiler.java:214)
              at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
              at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessar
              at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366
              at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati

              • 4. Re: problems deploying an war archive
                Mick Knutson Newbie

                I just had this issue last week.
                I think it may have to do with commenting out certain areas of the xml file. I created a scratch xml file and just removed all the erroneous commenting that was not needed, and that seemed to fix it.