wood burning stoves 2.0*
The moose likes Servlets and the fly likes Apache Tomcat/4.0.1 - HTTP Status 404 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Apache Tomcat/4.0.1 - HTTP Status 404 " Watch "Apache Tomcat/4.0.1 - HTTP Status 404 " New topic
Author

Apache Tomcat/4.0.1 - HTTP Status 404

sri latha
Greenhorn

Joined: Mar 03, 2006
Posts: 27
Hi all,iam new to servlets.while executing the HelloWorldServlet i got the "Requested resource is not aviable."i put the class file in this folder
"C:\Program Files\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes" and the web.xml is in this folder.C:\Program Files\Apache Tomcat 4.0\webapps\examples\WEB-INF.
Thanks in advance,
Chitti.
Iris Hoekstra
Greenhorn

Joined: Aug 10, 2005
Posts: 29
Can you show us your web.xml? And what url do you type in your browser's address bar to start your servlet?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

chitti tnk,
Welcome to JavaRanch!

We're pleased to have you here with us in the Servlets forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
You can use initials for your first name but not the last.

You can change it here
[ August 02, 2006: Message edited by: Bear Bibeault ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sri latha
Greenhorn

Joined: Mar 03, 2006
Posts: 27
this is the web.xml

C:\Program Files\Apache Tomcat 4.0\webapps\examples\WEB-INF






http://localhost:8080/HelloWorldServlet
this is the url typed in web browser.
C Bousfield
Greenhorn

Joined: Aug 02, 2006
Posts: 2
It's been a little while since I used Tomcat, but I think your web.xml is in the wrong location.

Check out this site. Number 2 under 'Test the Server' tells you where to put files, and how to access them.

Hopefully this is helpful!


Dr. Wilson: Beauty often seduces us on the road to truth. <br />Dr. Gregory House: And triteness kicks us in the nads.<br />-House MD
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

C Bousfield C Bousfield
Welcome to JavaRanch!

We're pleased to have you here with us in the servlets forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

chitti tacharla,

First, thank you for fixing your screen name.


You will need to add a servlet mapping to your web.xml in order to call the servlet from a browser.

Search this forum with keyword "servlet-mapping" or "url-pattern" for examples.
C Bousfield
Greenhorn

Joined: Aug 02, 2006
Posts: 2
Yeah, accidently copied my name twice. Whoops All fixed now.
 
Consider Paul's rocket mass heater.
 
subject: Apache Tomcat/4.0.1 - HTTP Status 404