M
Marc
Hi,
I've got a test prep book and I'm trying to prepare for the Sun
Certified Web Component Developer exam. Unfortunately, I've run into
a problem with Tomcat.
The problem that I've run into is that I can't get a simple HelloWorld
servlet to work (Yes, I know. It's pretty embarrassing). The problem
is that Tomcat tells me "404 resource not available" whenever I try to
access the servlet:
http://localhost:8080/chapter01/servlet/HelloWorldServlet
I've placed the servlet class file (Copied it straight off the CD that
came with the book) in my
D:\jakarta-tomcat-4.1.29\webapps\chapter01\WEB-INF\classes directory
and I've placed the web.xml file in my
D:\jakarta-tomcat-4.1.29\webapps\chapter01\WEB-INF directory.
The web.xml file reads:
<?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>
<display-name>chapter01</display-name>
<description>
Chapter 01 Example Servlet.
</description>
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>
</web-app>
I'm pretty sure I've set up Tomcat correctly because I can get to the
simple JSP page located at http://localhost:8080/index.jsp and I can
log in and play around with the Tomcat Web Application Manager. I've
used the Web Application Manager to stop and start and reload the
chapter01 application I don't know how many times.
Any help that anyone can provide will be greatly appreciated.
Thanks,
Marc
I've got a test prep book and I'm trying to prepare for the Sun
Certified Web Component Developer exam. Unfortunately, I've run into
a problem with Tomcat.
The problem that I've run into is that I can't get a simple HelloWorld
servlet to work (Yes, I know. It's pretty embarrassing). The problem
is that Tomcat tells me "404 resource not available" whenever I try to
access the servlet:
http://localhost:8080/chapter01/servlet/HelloWorldServlet
I've placed the servlet class file (Copied it straight off the CD that
came with the book) in my
D:\jakarta-tomcat-4.1.29\webapps\chapter01\WEB-INF\classes directory
and I've placed the web.xml file in my
D:\jakarta-tomcat-4.1.29\webapps\chapter01\WEB-INF directory.
The web.xml file reads:
<?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>
<display-name>chapter01</display-name>
<description>
Chapter 01 Example Servlet.
</description>
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>
</web-app>
I'm pretty sure I've set up Tomcat correctly because I can get to the
simple JSP page located at http://localhost:8080/index.jsp and I can
log in and play around with the Tomcat Web Application Manager. I've
used the Web Application Manager to stop and start and reload the
chapter01 application I don't know how many times.
Any help that anyone can provide will be greatly appreciated.
Thanks,
Marc