hi
I'm sure this is very simple but I have no experience with
servlets and I'm having problems getting a HelloWorld servlet to run after following the text from Servlets and
JSP - (Falkner, Jones).
HelloWorld.java is in ..\jspbook\WEB-INF\classes\com\jspbook as per the books example, I have produced web.xml and placed in the WEB-INF folder which is as follows
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4">
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>com.jspbook.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>welcome.html</welcome-file>
</welcome-file-list>
</web-app>
I run
ant and says build successful, compiled 1 source file, which creates HelloWorld.class in the same folder as the source file.
Now when I try and hit
http://127.0.0.1/jspbook/HelloWorld I get the following error report from
tomcat HTTP Status 404 - Servlet HelloWorld is not available
the tomcat logs contain this exception
java.lang.ClassNotFoundException: com.jspbook.HelloWorld
I really want to start making headway with this book so any help is greatly appreciated.