* I created a "myApp" directory inside of the "webapps" directory.
* Added the "web.xml" file at the webapps/myApp/WEF-INF level.
* Then, I created a simple HelloServlet.java file and added the classfile in the webapps/myApp/WEB-INF/classes directory.
* The web.xml has the following form:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
</web-app>
* After starting Tomcat, when I type the following link in IE, I get an HTTP Status 404 error: "The requested resource (/myApp/hello) is not available."
http://localhost:8080/myApp/hello
Even, the following URL doesn't work -
http://localhost:8080/myApp/servlet/hello
* I put an html file inside the "myApp" directory, and that does get loaded by the browser, so the Tomcat configuration/installation seems to be okay.
* I even tried adding a "Context" element in Tomcat's conf/server.xml file to explicitly define the "myApp" directory, but no use.
Really frustrated why things don't work. Any help would be most appreciated.
Thanks in advance !