tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yiannis Mavroukakis <>
Subject RE: Reg HTTP status 404 on Tomcat 5.0.16
Date Tue, 03 Feb 2004 14:12:05 GMT
Looks like you went about the wrong way with the Context and url pattern

Your servlet will work if you point your browser to

If I am not mistaken changing

should hopefully produce what you are after.


-----Original Message-----
From: Avinash Sridhar []
Sent: 03 February 2004 14:03
Subject: Reg HTTP status 404 on Tomcat 5.0.16

I have my "sampleapp" folder into which a small trial of HelloServlet needs
to be tested.

The directory structure of sampleapp is as follows,

The "classes" directory has got 

The <Context> </Context> tag in server.xml has been added like this.

/************************ server.xml ***************************/

<Context path="/sampleapp" docBase="e:\sampleapp" debug="0"
reloadable="true"> </Context>

/************************ server.xml ************/

/****************** web.xml *******************/
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

  <display-name>Servlet 2.4 Examples</display-name>
  <description> Servlet 2.4 Examples </description>

<!-- Servlet mapping start --> 
<!-- Define servlets. i.e. bind a servlet name to a class -->


<!-- bind a servlet name to a URL (pattern) -->

<!-- Servlet mapping end -->


/****************** web.xml *******************/

The error I am getting in the browser is this 

HTTP Status 404 - /sampleapp/HelloServlet

type Status report

message /sampleapp/HelloServlet

description The requested resource (/sampleapp/HelloServlet) is not

This is the url I gave 


Kindly let me know what could be wrong in the above configuration.

Any help would be appreciated.



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message