This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
description The requested resource (/ch1/Serv1) is not available.
Here is the thing, whenever I put the servlet class in the "servlets-examples" folder (that came with Tomcat) and then access the servlet with the class name specified I can access it fine and it works however I have been unable to make Tomcat recognize my web.xml file's descriptor settings which are :
By the way I used coreservlets's configuration tutorial and have the servlet invoker uncommented. I don't know if that is causing the problem.
It would be great if the source code was available with the book along with the preconfigured tomcat or j2ee appservers on the website. That would prevent me from wasting HOURS upon hours on simple examples that ought to work but don't because not all of us know the mysteries of some impossible container like tomcat (and ofcourse since its "FREE" its justifiable that hours of our lives be wasted away on this).
Joined: Dec 29, 2004
It worked. I figured it out and this is the new web.xml file. I don't know what the difference is between the two but this version worked somehow:
<?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">
<display-name>Head First Servlets Chapter 1 Servlet</display-name> <description> An application for testing servlets and JSP </description>