Hi,

have a look at the dtd for web.xml...

Lately I learned in a similar way that it is not allowed (according to the dtd)
to have something like:
<servlet>
<servlet-mapping>
<servlet>
<servlet-mapping>

somehow this would be logic: define the servlet and its mappings, then define the
next servlet...
The official web.xml-dtd requires:
<servlet>
<servlet>
<servlet-mapping>
...
==> define all servlets, then define all mappings...

some servlet-engines do not validate this, but accept the erroneous format as well.
Weblogic is always rather itchy about these kind of specs...

hope this helps
Alexander Jesse

-----Original Message-----
From: Jacob Marcus [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 11. Januar 2002 14:34
To: Struts Users Mailing List
Subject: Trouble with web.xml in weblogic 5.1 SP8


Hi folks,

I have to use Weblogic 5.1 SP8. My war file has a normal web.xml to
support struts. When the war file is deployed, the weblogic server is
not starting up properly. When the weblogic server is started it gives
an xml parser exception and says <servlet> attribute is not expected
under web-app.

My war file works fine in Tomcat.

What could be wrong? Please help.

The stacktrace is as follows.

org.xml.sax.SAXParseException: Element "web-app" does not
allow "servlet" here.
        at com.sun.xml.parser.Parser.error(Parser.java:2775)
        at com.sun.xml.parser.ValidatingParser$ChildrenValidator.consume

(Validat
ingParser.java:310)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1280)
        at com.sun.xml.parser.Parser.content(Parser.java:1498)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
        at com.sun.xml.parser.Parser.parse(Parser.java:283)
        at weblogic.xml.dom.SunDOMParser.getDocument
(SunDOMParser.java:69)
        at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
        at weblogic.servlet.internal.dd.DescriptorLoader.<init>
(DescriptorLoader
.java:134)
        at weblogic.t3.srvr.HttpServer.loadWARContext
(HttpServer.java:627)
        at weblogic.t3.srvr.HttpServer.initServletContexts
(HttpServer.java, Comp
iled Code)
        at weblogic.t3.srvr.HttpServer.start(HttpServer.java:418)
        at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
        at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
        at java.lang.reflect.Method.invoke(Native Method)
        at weblogic.Server.startServerDynamically(Server.java:99)
        at weblogic.Server.main(Server.java:65)
        at weblogic.Server.main(Server.java:55)

thanks,
Jacob


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to