• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Tomcat/4.0.1 - HTTP Status 404

 
sri latha
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
sri latha
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, accidently copied my name twice. Whoops All fixed now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic