You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Layman <ra...@aswethink.com> on 2002/02/21 17:41:38 UTC

RE: web.xml in Tomcat 4.0 -- HELP

	Your question is missing what the Tomcat logs are saying.  

	If I had to make a blind guess, you have the parameters in web.xml
out of order, which is causing Tomcat to not load the web.xml file (and thus
causing the 404 error).

	Randy

> -----Original Message-----
> From: Surya Suravarapu [mailto:ssuravarapu@yahoo.com]
> Sent: Thursday, February 21, 2002 12:16 PM
> To: Tomcat Users List
> Subject: Re: web.xml in Tomcat 4.0 -- HELP
> 
> 
> No body replied to this yet .. I'd like to explain it
> again and see if some body can help me.
> 
> I have a web application running perfectly fine with
> Tomcat 3.2.1. When I upgrade to 4.0.2 I couldn't run
> that.
> 
> After installing 4.0.2, I've added a servlet context
> for my web application in
> <CATALINA_HOME>/conf/server.xml
> and registered my servlet (servlet name:
> MainController) in WEBAPP/Web-Inf/web.xml. I've also
> added a url-pattern for it.
> 
> After all that and restarting tomcat, I've tried to
> access that servlet by localhost:8080/testwebapp/main
> - I'm getting a response 404 error. The error is some
> thing like this:
> 
> --------------------------------------------------
> Apache Tomcat/4.0.2 - HTTP Status 404 - /main
> 
> type: Status report
> 
> message: /main
> 
> description: The requested resource (/main) is not
> available.
> ---------------------------------------------------
> 
> What is that I'm missing? Can some body please help
> ...
> 
> -Surya
> 
> --- Surya Suravarapu <ss...@yahoo.com> wrote:
> > I've observed that Tomcat is reading conf/web.xml in
> > version 4.0 unlike 3.2. 
> > 
> > I have a web-inf/web.xml in my web application
> > folder.
> > I have my servlet registered there and have a
> > URL-pattern mapped for it. But when I try to run the
> > application I am getting 404 File Not Found error.
> > 
> > Error message:
> > Apache Tomcat/4.0.2 - HTTP Status 404 - /main
> > 
> > Can some body please help me.
> > 
> > Thanks.
> > -Surya
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - Coverage of the 2002 Olympic Games
> > http://sports.yahoo.com
> > 
> > --
> > To unsubscribe:  
> > <ma...@jakarta.apache.org>
> > For additional commands:
> > <ma...@jakarta.apache.org>
> > Troubles with the list:
> > <ma...@jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: web.xml in Tomcat 4.0 -- HELP

Posted by Surya Suravarapu <ss...@yahoo.com>.
Randy,

You are right, Tomcat could not find my application's
web.xml file. Is there any sample web.xml available
that I can look at, in case I'm missing or misplacing
any parameters in it? 

Please look in to the error logs:

2002-02-21 07:36:25 WebappLoader[/testwebapp]:
Deploying class repositories to work directory
E:\Tomcat4\work\localhost\testwebapp
2002-02-21 07:36:25 StandardManager[/testwebapp]:
Seeding random number generator class
java.security.SecureRandom
2002-02-21 07:36:25 StandardManager[/testwebapp]:
Seeding of random number generator has been completed
2002-02-21 07:36:25 ContextConfig[/testwebapp]:
Missing application web.xml, using defaults only
2002-02-21 07:36:25
StandardWrapper[/testwebapp:default]: Loading
container servlet default
2002-02-21 07:36:25 default: init
2002-02-21 07:36:25
StandardWrapper[/testwebapp:invoker]: Loading
container servlet invoker
2002-02-21 07:36:25 invoker: init
2002-02-21 07:36:25 jsp: init
2002-02-21 07:36:25 Internal Error: File
/WEB-INF/web.xml not found
2002-02-21 07:36:25
StandardWrapper[/testwebapp:MainController]: Marking
servlet MainController as unavailable
2002-02-21 07:36:26 StandardContext[/testwebapp]:
Servlet /testwebapp threw load() exception
javax.servlet.ServletException: Wrapper cannot find
servlet class
com.testwebapp.servlets.maincontroller.MainController
or a class it depends on
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:871)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3266)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at
org.apache.catalina.startup.Catalina.start(Catalina.java:781)
	at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
	at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
----- Root Cause -----
java.lang.ClassNotFoundException:
com.testwebapp.servlets.maincontroller.MainController
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1243)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:865)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3266)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at
org.apache.catalina.startup.Catalina.start(Catalina.java:781)
	at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
	at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

Thanks.

-Surya



--- Randy Layman <ra...@aswethink.com> wrote:
> 
> 	Your question is missing what the Tomcat logs are
> saying.  
> 
> 	If I had to make a blind guess, you have the
> parameters in web.xml
> out of order, which is causing Tomcat to not load
> the web.xml file (and thus
> causing the 404 error).
> 
> 	Randy
> 
> > -----Original Message-----
> > From: Surya Suravarapu
> [mailto:ssuravarapu@yahoo.com]
> > Sent: Thursday, February 21, 2002 12:16 PM
> > To: Tomcat Users List
> > Subject: Re: web.xml in Tomcat 4.0 -- HELP
> > 
> > 
> > No body replied to this yet .. I'd like to explain
> it
> > again and see if some body can help me.
> > 
> > I have a web application running perfectly fine
> with
> > Tomcat 3.2.1. When I upgrade to 4.0.2 I couldn't
> run
> > that.
> > 
> > After installing 4.0.2, I've added a servlet
> context
> > for my web application in
> > <CATALINA_HOME>/conf/server.xml
> > and registered my servlet (servlet name:
> > MainController) in WEBAPP/Web-Inf/web.xml. I've
> also
> > added a url-pattern for it.
> > 
> > After all that and restarting tomcat, I've tried
> to
> > access that servlet by
> localhost:8080/testwebapp/main
> > - I'm getting a response 404 error. The error is
> some
> > thing like this:
> > 
> > --------------------------------------------------
> > Apache Tomcat/4.0.2 - HTTP Status 404 - /main
> > 
> > type: Status report
> > 
> > message: /main
> > 
> > description: The requested resource (/main) is not
> > available.
> >
> ---------------------------------------------------
> > 
> > What is that I'm missing? Can some body please
> help
> > ...
> > 
> > -Surya
> > 
> > --- Surya Suravarapu <ss...@yahoo.com>
> wrote:
> > > I've observed that Tomcat is reading
> conf/web.xml in
> > > version 4.0 unlike 3.2. 
> > > 
> > > I have a web-inf/web.xml in my web application
> > > folder.
> > > I have my servlet registered there and have a
> > > URL-pattern mapped for it. But when I try to run
> the
> > > application I am getting 404 File Not Found
> error.
> > > 
> > > Error message:
> > > Apache Tomcat/4.0.2 - HTTP Status 404 - /main
> > > 
> > > Can some body please help me.
> > > 
> > > Thanks.
> > > -Surya
> > > 
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Sports - Coverage of the 2002 Olympic
> Games
> > > http://sports.yahoo.com
> > > 
> > > --
> > > To unsubscribe:  
> > >
> <ma...@jakarta.apache.org>
> > > For additional commands:
> > > <ma...@jakarta.apache.org>
> > > Troubles with the list:
> > > <ma...@jakarta.apache.org>
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - Coverage of the 2002 Olympic Games
> > http://sports.yahoo.com
> > 
> > --
> > To unsubscribe:  
> <ma...@jakarta.apache.org>
> > For additional commands:
> <ma...@jakarta.apache.org>
> > Troubles with the list:
> <ma...@jakarta.apache.org>
> > 
> 
> --
> To unsubscribe:  
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>