Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

parsing web.xml error

0 views
Skip to first unread message

han

unread,
Oct 8, 2001, 5:36:48 PM10/8/01
to

hi, Everyone:

i have 2 servlets in my web application.

in my web.xml, i register them as:

<servlet>

<servlet-name>popchart</servlet-name>

<servlet-class>com.corda.servlet.popchart</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>popchart</servlet-name>

<url-pattern>/popchart</url-pattern>

</servlet-mapping>


<servlet>

<servlet-name>ContentDispatcher</servlet-name>

<servlet-class>skylos.common.ContentDispatcher</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>ContentDispatcher</servlet-name>

<url-pattern>/ContentDispatcher</url-pattern>

</servlet-mapping>

---------------------------------------

if i comment out the 2nd servlet. the webApp can be successfully

deployed. if i leave 2nd servlet, i got the errors:

<HTTP> Error parsing descriptor in Web application
'/weblogic/myserver/sky.war'

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)

.....................

--------------- nested within: ------------------
Received SAXParseException from Sun Parser at line 18, column -
1: org.xml.sax.SAXParseException:

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

at weblogic.xml.dom.SunDOMParser.getDocument
(SunDOMParser.java:72)

at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)

at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader.java:132)

..........................

thanks in advance.

hansen

han

unread,
Oct 8, 2001, 5:58:15 PM10/8/01
to

the error rises whenever i register 2 servlets in web.xml.

it will work if i only define one servlet. no matter which one.

any ideas?

hansen

>......................


>
>--------------- nested within: ------------------
>Received SAXParseException from Sun Parser at line 18, column -
>1: org.xml.sax.SAXParseException:
>
>Element "web-app" does not allow "servlet" here.
>
> at weblogic.xml.dom.SunDOMParser.getDocument
>(SunDOMParser.java:72)
>
> at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
>
> at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader.java:132)
>

>...........................
>
>thanks in advance.
>
>hansen

han

unread,
Oct 8, 2001, 7:04:43 PM10/8/01
to

1: i should post it in Servlet group

2: i solved it. all servlets have to define 1st in web.xml. then

define servlet-mapping.

han

>......................


>
>--------------- nested within: ------------------
>Received SAXParseException from Sun Parser at line 18, column -
>1: org.xml.sax.SAXParseException:
>
>Element "web-app" does not allow "servlet" here.
>
> at weblogic.xml.dom.SunDOMParser.getDocument
>(SunDOMParser.java:72)
>
> at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
>
> at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader.java:132)
>

0 new messages