Hi, I'm working through the Head First Servlets and JSP's (send ed.) book and I can't get the first servlet to work. Despite trying things I found in other threads on this forum for the same thing
I'm getting a 404 error when I go to the url http://localhost:8080/ch1/serv1
description The requested resource (/ch1/serv1) is not available.
Can anyone give me a pointer to what (undoubtedly stupid) mistake I'm making?
My system details:
OS: Ubuntu 10.0.4 (32 bit)
Tomcat Version: Apache Tomcat/6.0.24
JVM Version: 1.6.0_18-b18
JVM Vendor: Sun Microsystems Inc.
OS Name: Linux
OS Version: 2.6.32-24-generic
OS Architecture: i386
-C! -C! It's easier with the trailing "/" to show directories.
I would, however, like to commend you on the quantity and quality of information provided to help solve the problem.
Unfortunately, I'm not sure what the problem is, because everything appears to be in order. Is there anything in the log at startup or when you try to access the servlet from the browser? (And you're probably right, it'll end up being something silly, which will make *me* look even sillier for not seeing it :)
I agree. Everything seems to be in place and hence really difficult to predict what's going on wrong. So, thought of asking very basic (and bad) question. Have you started/restarted tomcat after the deployment? [tomcat doesn't support hot-deploy].
If you have restarted the tomcat, can you please study the log and let us know whether everything is fine there? No exceptions?
Hi Steven, in the beginning I also used to get the same errors. What I did in the beginning is, we wont get servlet.jar with jsdk, so I used to copy the jar into java/jre/lib to compile. Then later I used to take the class tile into WEB-INF/classes folder. Then later I realized that this is not the right approach, so you once check whether you have done something like this.
Love all, trust a few, do wrong to none.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop