Karl Schmitt wrote:
Dear Folks,
I am a newbee to Servlets and I working myself thought the
Head First Servlet Book. There is a simple example of
a hello world servlet and a web.xml file deployed under the
webapps folder, I did exactly as described in the book
however I do get a 404, even though the localhost:8080
works fine. I have no clue how to debug this, the logfiles
do not mention the deployment of my servlet, so I think
I do have to configure a little more or so ...?
I have a linux box and the uname -a command delivers the
following respons:
Linux sonoma 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:24:35 UTC 2011
i686 GNU/Linux
Sorry, but I don't know the book.
So maybe you can tell us some more :
- how did you install Tomcat ? where did you get it ?
- what version is it ?
(go to the "bin" directory of tomcat, and run "./version.sh"; paste the result
here)(*)
- what version is the JVM ? ("java -version" may tell you, if the above
doesn't)
- can you give us the exact paths where you installed your servlet files ? (the servlet
itself and the web.xml file)
- in the Tomcat "conf" directory (in your case, it may be in /etc/tomcatxx), there is a
file "server.xml". In that file, is a <Host> tag, which gives the path for the webapps
directory (in the "appBase" attribute). Which is that ?
(*) if this is a "packaged" tomcat, this may complain that JAVA_HOME is not set. If so,
you first have to locate what JAVA_HOME should be set to. Look then in
/etc/init.d/tomcatxx to find out.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org