You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Drabb <JD...@tampabay.rr.com> on 2003/04/08 03:43:45 UTC

Getting Started

Hello group,

I am moving from the C,C++ and Java world into JSP/Servlets. I have
chosen Tomcat to start learning with. After reading through the docs
and following examples in a book, I am unable to get one servlet
installed : (
I am running tomcat-4.1.24-LE-jdk14 under Linux. Tomcat is running
fine. Under CATALINA_HOME, if I put a simple Hello servlet
under CATALINA_HOME/webapps/examples/WEB-INF/classes and then run it
from http://localhost:8080/examples/servlet/Hello It works as expected
and spits out "Hello, Jim". If I move the servlet to
CATALINA_HOME/webapps/ROOT/WEB-INF/classes and run it as
http://localhost:8080/servlet/Hello I get a 404. So I then tried to
make a new directory under CATALINA_HOME/webapps (the same level as
the examples directory) named dri and copied the working Hello servlet
from examples/servlet/Hello.class to dri/servlet/Hello, copied the
web.xml file from examples and changed just a few settings. I then
restarted the server and the Hello servlet at
http://39px901:8080/dri/servlet/Hello gives me a 404. What am I doing
wrong and what section of docs did I skip that explain how to simply
copy a servlet and get it running?

Any help would be great,

Jim Drabb
-- 
---------------------------------------------------------------
Those who would sacrifice freedom for security will get neither
---------------------------------------------------------------
James Drabb JR
Programmer Analyst
Davenport, FL USA
JDrabb at tampabay dot rr dot com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Getting Started

Posted by Andy Eastham <an...@gliant.com>.
Jim,

Go to www.moreservlets.com and read the sample chapter 5 on web.xml.

This will explain how to map urls onto your servlets.  Understanding web.xml
now will help you out immensely as you get more experienced.

Andy

> -----Original Message-----
> From: James Drabb [mailto:JDrabb@tampabay.rr.com]
> Sent: 08 April 2003 02:44
> To: tomcat-user@jakarta.apache.org
> Subject: Getting Started
>
>
> Hello group,
>
> I am moving from the C,C++ and Java world into JSP/Servlets. I have
> chosen Tomcat to start learning with. After reading through the docs
> and following examples in a book, I am unable to get one servlet
> installed : (
> I am running tomcat-4.1.24-LE-jdk14 under Linux. Tomcat is running
> fine. Under CATALINA_HOME, if I put a simple Hello servlet
> under CATALINA_HOME/webapps/examples/WEB-INF/classes and then run it
> from http://localhost:8080/examples/servlet/Hello It works as expected
> and spits out "Hello, Jim". If I move the servlet to
> CATALINA_HOME/webapps/ROOT/WEB-INF/classes and run it as
> http://localhost:8080/servlet/Hello I get a 404. So I then tried to
> make a new directory under CATALINA_HOME/webapps (the same level as
> the examples directory) named dri and copied the working Hello servlet
> from examples/servlet/Hello.class to dri/servlet/Hello, copied the
> web.xml file from examples and changed just a few settings. I then
> restarted the server and the Hello servlet at
> http://39px901:8080/dri/servlet/Hello gives me a 404. What am I doing
> wrong and what section of docs did I skip that explain how to simply
> copy a servlet and get it running?
>
> Any help would be great,
>
> Jim Drabb
> --
> ---------------------------------------------------------------
> Those who would sacrifice freedom for security will get neither
> ---------------------------------------------------------------
> James Drabb JR
> Programmer Analyst
> Davenport, FL USA
> JDrabb at tampabay dot rr dot com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org