This has been the worst day ever. The network went down just long enough to interupt my nearly completed 8 hour download. I overwrote about 6000 words because of clumsy fingers. And now I've got a head cold. So, with all that in mind, please help me make some good of my day!
I've been struggling with this for weeks and keep putting it off. I'm trying to learn
servlets from the "Head First Servlets and JSP" book but everytime I start coding whats in the book, I get errors. Here's what I've done this time:
I'm using Linux Fedora Core 3 and
Java 1.5.0. I've uninstalled the latest version of
tomcat (by deleting the /usr/local/tomcat directory). I've then installed a 5.0.xxx version in accordance with the preface to the book (version 5.0.28 to be precise). My $TOMCAT_HOME and $JAVA_HOME variables are set.
Then I start coding the examples on page 30 of the book and put them in the right directories (I've even figured out and fixed the error in the web.xml file in the xsi:schemaLocation attribute). I've compiled the .java file (no problems), put everything in the proper directories under webapps, and then started up tomcat (again no errors). I go to
http://localhost:8080 and see the tomcat page a-ok! Then I go to
http://localhost:8080/ch1/Serv1 and I get the following error:
Why can't it see my servlet? I've tried copying in some of the example servlets (which work fine in their own directory), changing the web.xml etc. to show where the new servlets are and what they're called, but they don't work in any folder I make under tomcat/webapps? I've also compiled other peoples servlet code and tried to see if that would work but no joy. I'm really at the end of my tether!
Is this an error with permissions or something? I must have tried this close to a hundred times in the last few months, different versions of tomcat, different servlet code, etc. etc. !
If anyone can tell me how to get a servlet working, or if you have any ideas what I'm doing wrong, or any ideas how I could begin to find out what I'm doing wrong, please reply!!! (I'm not normally one for exclmation marks in posts, but I'm getting very frustrated
)