tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François Vallet <fval...@infovista.com>
Subject RE: [tomcat4.1.12] How to manage my own default Servlet
Date Thu, 31 Oct 2002 15:04:45 GMT
Ok maybe the most important is the mapping url"/" and not the servlet name
...
I'have read into the Servlet 2.3 spec 
"A string containing only the '/' character indicates the "default" servlet
of the
application. In this case the servlet path is the request URI minus the
context
path and the path info is null."


> -----Original Message-----
> From: François Vallet [mailto:fvallet@infovista.com]
> Sent: jeudi 31 octobre 2002 15:58
> To: 'tomcat-user@jakarta.apache.org'
> Subject: [tomcat4.1.12] How to manage my own default Servlet
> 
> Hello everybody
> I have my own default Servlet and I would like to use it only for my
webapps
> instead of the org.apache.catalina.servlets.DefaultServletapache
> 
> In order to override the default definition I have added my own tags into
my
> web.xml
> Ex :
> <servlet>
>     <servlet-name>Default</servlet-name>
>    <servlet-class>util.MyDefaultServlet</servlet-class>
>    </servlet>
> 
>      <servlet-mapping>
>        <servlet-name>Default</servlet-name>
>         <url-pattern>/</url-pattern>
>       </servlet-mapping>
> 
> But I have the following errors
> WebappClassLoader:  Checking for javax/servlet/Servlet.class
> java.lang.reflect.InvocationTargetException:
> java.lang.IllegalArgumentException: addChild:  Child name 'default' is not
> unique
> 	at
>
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
> 15)
> 	at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
> 	at
>
org.apache.catalina.core.StandardContext.addChild(StandardContext.java:1320)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at
>
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
> 	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
> 	at
> org.apache.commons.digester.Digester.endElement(Digester.java:1036)
> 	at
>
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
> a:579)
> 	at
> org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.j
> ava
> :646)
> 	at
>
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator
> .
> java:1972)
> 	at
>
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:8
> 78)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(X
> MLDo
> cumentFragmentScannerImpl.java:1144)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XML
> Docu
> mentFragmentScannerImpl.java:987)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
> patc
> her.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD
> ocume
> ntFragmentScannerImpl.java:333)
> 	at
>
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
> 	at
>
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
> 	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> 	at
>
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:116
> 9)
> 	at org.apache.commons.digester.Digester.parse(Digester.java:1495)
> 	at
>
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
> va:282)
> 	at
> org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
> 	at
>
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
> 243)
> 	at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:166)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java:497)
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
> 	at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> 	at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> [ERROR] Digester - -End event threw exception
> <java.lang.reflect.InvocationTargetException>
> 
> Thanks in advance
> François.
> 
> 
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message