You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "S.Latha Kamatchi" <sl...@yahoo.com> on 2004/03/10 13:14:40 UTC
Plm with web.xml - Tomcat 4.1.27
Hi Tomcat users,
I placed the web.xml in WEB-INF folder . Its working well with Tomcat 5.0.19.
But tried with Tomcat 4.1.27, it shows the following error.
Mar 10, 2004 4:18:55 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Mar 10, 2004 4:18:56 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Mar 10, 2004 4:18:58 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Mar 10, 2004 4:19:02 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.27
Mar 10, 2004 4:19:09 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
e
Mar 10, 2004 4:19:09 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
l=true
Mar 10, 2004 4:19:11 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
nNull=true
Mar 10, 2004 4:19:19 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:252)
at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:50
5)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S
ource)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
nfig.java:282)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
9)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:243)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
568)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:307)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:559)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:358)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
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:4
97)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unkn
own servlet name testServlet
at org.apache.catalina.core.StandardContext.addServletMapping(StandardCo
ntext.java:1687)
... 48 more
Mar 10, 2004 4:19:20 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Mar 10, 2004 4:19:20 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 10, 2004 4:19:20 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=30/220 config=D:\tomcat-4\conf\jk2.properties
-----------------------------
My xml file is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet-mapping>
<servlet-name>testServlet</servlet-name>
<url-pattern>/servlet/testServlet</url-pattern>
</servlet-mapping>
</web-app>
Could u help me resolve this
Thankx in advance
Latha
---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster.
Re: Plm with web.xml - Tomcat 4.1.27
Posted by "S.Latha Kamatchi" <sl...@yahoo.com>.
Good Morning Doug,
Let me try this and let u know...
Thanks for the reply
Latha
Parsons Technical Services <pa...@earthlink.net> wrote:
Latha,
For TC4 you need the web.xml to be this:
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
testServlet
Testing
yourPackageName.testServlet
testServlet
/testServlet
In TC4 you have to have both (if I understand correctly) and when you map
you don't need the /servlet in the pattern.
Give it a try.
Note all servlet tags must be grouped together and occur before the mapping
tags.
Doug
www.parsonstechnical.com
>
> My xml file is as follows:
>
>
> > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
>
>
> testServlet
> /servlet/testServlet
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster.
Re: Plm with web.xml - Tomcat 4.1.27
Posted by Parsons Technical Services <pa...@earthlink.net>.
Latha,
For TC4 you need the web.xml to be this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>testServlet</servlet-name>
<display-name>Testing</display-name>
<servlet-class>yourPackageName.testServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>testServlet</servlet-name>
<url-pattern>/testServlet</url-pattern>
</servlet-mapping>
</web-app>
In TC4 you have to have both (if I understand correctly) and when you map
you don't need the /servlet in the pattern.
Give it a try.
Note all servlet tags must be grouped together and occur before the mapping
tags.
Doug
www.parsonstechnical.com
>
> My xml file is as follows:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>
> <servlet-mapping>
> <servlet-name>testServlet</servlet-name>
> <url-pattern>/servlet/testServlet</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org