You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rahul Choubey <c_...@yahoo.com> on 2007/02/13 06:17:43 UTC
Problem running servlets on tomcat
Dear Friends,
I am having a problem running servlets on the browser using Tomcat.I am using Apache Tomcat 4.1.34 and am saving the .class file at the following location in my system:-
E:\Program Files\apache-tomcat-4.1.34\webapps\rahul\Web-Inf\classes
rahul\Web-Inf\classes being the folders created by me.
I have also copied the web.xml to:
E:\Program Files\apache-tomcat-4.1.34\webapps\rahul
and altered the file(web.xml at above secified location) is:-
<web-app>
<display-name>rahul</display-name>
<description>Rahul Test Servlet</description>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/chk/res</url-pattern>
</servlet-mapping>
</web-app>
HelloServlet being the class name of the servlet program.
http://localhost:8080/rahul/chk/res on putting this in the address bar of my browser I get the following error:
Apache Tomcat/4.1.34- HTTP Status 404 - /rahul/chk/res
type Status report
message /rahul/chk/res
description The requested resource (/rahul/chk/res) is not available.
Please Help me.
Regards,
Rahul
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
RE: Problem running servlets on tomcat
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rahul Choubey [mailto:c_rahulhyd@yahoo.com]
> Subject: Problem running servlets on tomcat
>
> E:\Program Files\apache-tomcat-4.1.34\webapps\rahul\Web-Inf\classes
Even on Windows, directory and file names defined in the servlet spec
are case sensitive. The directory name should be WEB-INF, not Web-Inf.
> I have also copied the web.xml to:
> E:\Program Files\apache-tomcat-4.1.34\webapps\rahul
Read the servlet spec and look at the examples that come with Tomcat:
the web.xml file must be in the WEB-INF directory, not the app's main
directory.
Try those changes and see what happens.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org