I'm a novice and I'm working through the Tomcat documentation.  
(I'm using Tomcat 5.)  I've gotten to step 3, 

http://localhost:8080/tomcat-docs/appdev/deployment.html

I'd previously compiled the "HelloWorld" example from the O'Reilly book on 
Java Servlet Programming by Hunter.  I then wanted to run it from the 
browser, so I set up something like the servlets-examples that also has a
HelloWorldExample, so I did the following:

1. created a "foo" directory under $CATALINA_HOME/webapps
2. created a WEB-INF directory under "foo"
3. created a "classes" directory under WEB-INF
4. copied the HelloWorld.java and HelloWorld.class files to
the "classes" directory and made them world readable.
5. chmod all directories 755
6. created a web.xml file from tomcat-docs/appdev/web.xml.txt
7. created an index.html file under "foo" that has a hyperref to 
"servlet/HelloWorld"
8. restarted Tomcat

I checked the log files and I've eliminated the parsing errors for the
web.xml file.  I'm able to visit the index.html file, but when I click on
the
link to "servlet/HelloWorld" I get a 404. 

Note that the web.xml.txt file says that I should be able to execute my
servlet just by accessing localhost:8080/foo/servlet/HelloWorld, yet I'm 
not able to do so.  I think that means that the problem isn't in my web.xml
file (even though that's the most complicated and error-prone step).

I also tried putting the HelloWorld.* files in
webapps/ROOT/WEB-INF/classes,
as directed in the Hunter book, but that didn't work either (404).

Anyone have any ideas on how to get this very simple example working?

Thanks,

Scott

--
Scott D. Anderson
Computer Science Department
Wellesley College
[EMAIL PROTECTED]

 






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to