Hello guys. I know this is a very, very stupid question but i havent been able to make this work. I have just started to study the Head First
Servlets &
JSP book and i am trying to run the very first example. I am having a problem with this, because what I get from the browser is a 404 error saying that it cant find the resource i am looking for. I am running windows 7, 64 bits and the apache server with
tomcat V 5.5. I have set the JAVA_HOME to C:\Program Files\Java\jre6 and the TOMCAT_HOME to C:\Program Files\Apache Software Foundation\Tomcat 5.5 where it is installed. I have checked the structure asked in the book:
webapps
|
ch1
|
WEB-INF
|
web.xml
|
classes
Ch1Servlet.class
Here is what the web.xml contains:
<?xml version=”1.0” encoding=”ISO-8851-1” ?>
<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”>
<servlet>
<servlet-name>Chapter1 Servlet</servlet-name>
<servlet-class>Ch1Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Chapter1 Servlet</servlet-name>
<url-pattern>/Serv1</url-pattern>
</servlet-mapping>
</web-app>
Here is what i am writing in the URL field:
http://localhost:8080/ch1/Serv1
I have tried the examples included during the installation of the web server and they work. Could some one please help me with that??? Thanks a lot!