Found the problem. I am using Windows NT. In NT explorer, "Web-inf" and "WEB-INF" are
both displayed as "Web-inf". Only if you right click and see property you can find
MS-DOS name which is the actual one.
When I installed Tomcat, "examples" webapps had a folder "Web-inf" which is actually
"WEB-INF". So I also created same name.
Spent almost a day but now I am happy that it is working.
-----Original Message-----
From: Annam, Sunil
Sent: Tuesday, August 27, 2002 3:23 PM
To: [EMAIL PROTECTED]
Subject: Cannot allocate servlet instance for path
Hi,
I was using Tomcat 3.x and now switched to tomcat 4.1.9. I am not able to run the
servlets that I used to do. So just for testing I did the following
created a folder "exmp" under webapps. created a foler "Web-inf" under "exmp" and
"classes" under "Web-inf". Copied "HelloWorldExample.class" from
webapps/examples/Web-inf/classes.
webapps-->exmp
|->Web-inf
|->web.xml
|->classes
|->HelloWorldExample.class
Modified server.xml. Added the following
<Context path="/exmp" docBase="exmp" debug="0"
reloadable="true" crossContext="true">
</Context>
Created web.xml in Web-inf
<?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>HelloWorld</servlet-name>
<servlet-class>
HelloWorldExample
</servlet-class>
</servlet>
</web-app>
When I start Tomcat and try to access HelloWorldExample by url
"http://localhost:8080/exmp/servlets/HelloWorldExample", it gives me Error 404
In the localhost_log.txt
invoker: Cannot allocate servlet instance for path /exmp/servlet/HelloWorldExample
javax.servlet.ServletException: Wrapper cannot find servlet class HelloWorldExample or
a class it depends on
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:880)
Any idea what is happening ? what am I missing ?
HelloWorldExample from examples/servlet/HelloWorldExample is working.
Thanks in advance.
Sunil Annam
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>