Hi...
I'm using
tomcat 5.5 for the first time. I have a jdk6 installed in my system. When I try to deploy a
servlet, it is not getting picked up in the browser.
I have created a directory structure like this
WebApps
|
|
V
ROOT
|
|
---Sample
|
|
---index.html
|
WEB-INF
|
---web.xml
|
classes
|
----HelloServlet.class
This is a copy of my web.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>myHello</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myHello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>
Link Tag my index.html :
<A HREF="hello">Run HelloServlet</A>
I get this error when I click the "Run HelloServlet" link :
HTTP Status 404 - /Sample/hello
type Status report
message /ch1/hello
description The requested resource (/ch1/hello) is not available.
Apache Tomcat/5.5.33