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
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
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)
>