You need to read the tomcat docs which tell how to configure a web
application. You need to create a web.xml file as well as need to register
the webapp in some webapp.xml.

-----Original Message-----
From: Sohaila Roberts [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 13, 2002 11:21 AM
To: [EMAIL PROTECTED]
Subject: getting a servlet to work with tomcat


Hi, i've successfully installed tomcat on redhat 7.2, and running the
examples works perfect by going to
http://localhost:8000/examples/servlets/index.html

but when i tried to run one of my own servlets it didnt work.

I created/compiled my servlet, SampleServlet, put it in a dir
tomcat/webapps/pr/ made a war file pr.war (by doing jar cvf pr.war pr/ from
the webapps dir) and let the war file in the webapps dir. I restarted tomcat
and it said 2002-08-13 12:31:21 - ContextManager: Adding DEFAULT:/pr

so i ran my page which calls the servlet and when it tried to run the
servlet i got this from tomcat:  2002-08-13 12:40:23 - Ctx(/pr) : Status
code:404 request:R( /pr + /SampleServlet + null) msg:null


i dont have all the directory's (images  jsp  META-INF  servlets  WEB-INF)
like their examples dir has, my pr directory only has the
SampleServlet.class and SampleServlet.java in it..

what am I doing wrong? do i have to have the meta-inf & all those dirs in
there too? of so, how do i do that and why do ihave to do that?

Thanks,
Sohaila

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


"The information in this e-mail, and any attachment therein, is
confidential and for use by the addressee only. If you are not the
intended recipient, please return the e-mail to the sender and delete
it from your computer. Although The Bank of New York attempts to
sweep e-mail and attachments for viruses, it does not guarantee that
either are virus-free and accepts no liability for any damage sustained
as a result of viruses."

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to