tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Layout/setup for a
Date Mon, 09 Dec 2002 19:40:36 GMT
Assuming your servlet class is com.yourcompany.yourservlet, do the

- Add the servlet declaration to your deployment descriptor (web.xml):

- Add the servlet mapping to your deployment descriptor:

- The link from your index.html would then look like:
  <a href="/myproject/YourServlet">Your Servlet</a>

- You don't need to edit server.xml.

- If your servlet is packaged as above, it should be in

- If you have any errors in the tomcat logs, post them to the list.

Good luck ;)

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Patrick Martz []
>Sent: Monday, December 09, 2002 2:35 PM
>Subject: Layout/setup for a
>Hi all,
>please bear with me as I'm new to the whole web application thing. I
>downloaded and installed Tomcat 4.1. After reading all the
>I could find, I tried to set it up so that I could run a small web-app,
>I simply
>cannot seem to get the web page to access the java servlet.
>The details:
>I have created a project directory under the root tomcat/webapps
>Within that directory is an index.html (which I'm able to successfully
>access by http://localhost:8080/myproject/index.html). In the myproject
>I have created a "WEB-INF" subdirectory, and a "classes" subdirectory
>under that where my servlet.class file resides. I have a web.xml file
>in the WEB-INF directory which is essentially empty (doesn't list
>any servlet classes).
>No matter what link I've tried to put in my index.html to access the
>servlet.class, it always fails to find it. So my question is, what do I
>to do to make this work??? Do I need the servlet class defined in the
>web.xml file? If so, how? And if I defined it, what is the relative
>the index.html that I need to include? Do I need to make some
>to the server.xml file as well? I have been working on this thing
>for well over a day and I just can't seem to make it work (no matter
>many examples I mimic or documents I read). Help! :)
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>For additional commands, e-mail: <mailto:tomcat-user-

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message