hi all,
i'm trying to run a
servlet from my own web application
but its giving me following error
HTTP Status 404 - /myLearning/servlet/HelloServlet
--------------------------------------------------------------------------------
type Status report
message /myLearning/servlet/HelloServlet
description The requested resource (/myLearning/servlet/HelloServlet) is not available
i'm giving the following path
http://localhost:8080/myLearning/servlet/HelloServlet and my class file for servlet is placed in this dir structure
E:\gaurav\j2ee\apache-tomcat-5.5.20\webapps\myLearning\WEB-INF\classes
i've made the corresponding enteries in web.xml file placed here
E:\gaurav\j2ee\apache-tomcat-5.5.20\webapps\myLearning\WEB-INF
and the file is:
<?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 xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>myLearning</display-name>
<description>
myLearning
</description>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/HelloServlet</url-pattern>
</servlet-mapping>
</web-app>
but if i put my class file in ROOT structure
E:\gaurav\j2ee\apache-tomcat-5.5.20\webapps\ROOT\WEB-INF\classes
and make the corresponding enteries in web.xml file, it runs fine
i'm not able to figure out whats going wrong.
please reply.