Hi all, I'm quite new to Tomcat but I'm trying to make some headway with basics. I just tried to get a simple servlet working--no luck. I get a 404 not found from the server when the servlet is invoked. Most likely it's just pilot error, but I can see there's a lot of strings and directory names to get right for just one little servlet. So my first question is:

Is there any way to get Tomcat to tell me more than just "Not found?"

I've already tried increasing the logging to "debug," but I see nothing untoward in the logs, just a lot of [info]. I've tried eyeballing the web.xml file and the directory paths several times and I can see my typo. I hope there's a better way because large apps would be an incredible pain.

Let's see, I restart the server (Tomcat) each time I edit the web.xml file. The example jsp and servlets that come with Tomcat work so I don't think it's an install problem.

Any help or ideas on how to debug this would be much appreciated.

If you want to debug for me, here's some more info on the specific app:
1. The servlet is called from a simple form.  The html here loads fine:
       <form method="POST" action="SelectBeer.do">

2. The app is installed in (Tomcat_home)/webapps/ROOT/Beer-v1

3. The servlet is installed in (cut and paste here):
(Tomcat_home)\webapps\ROOT\Beer-v1\WEB-INF\classes\homenet\Marge\web\BeerSelect.class

4. This matches the dev directory (generated by javac):
D:\Dev\Projects\Web\HF_JSP\BeerV1\classes\homenet\Marge\web\BeerSelect.class

5. The web.xml file is in the Beer-v1 directory
...\Tomcat 5.5\webapps\ROOT\Beer-v1\WEB-INF\web.xml

6. The contents of web.xml are quite simple:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
   version="2.4">
   <servlet>
       <servlet-name>Chapter 3 Beer</servlet-name>
       <servlet-class>homenet.Marge.web.BeerSelect</servlet-class>
   </servlet>
   <servlet-mapping>
       <servlet-name>Chapter 3 Beer</servlet-name>
       <url-pattern>/SelectBeer.do</url-pattern>
   </servlet-mapping>
</web-app>




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

Reply via email to