tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wesley Ribeiro" <wesle...@nortelnetworks.com>
Subject Help with servlet mapping
Date Thu, 08 Feb 2001 15:27:49 GMT
Hi !

Can you please help me solve the following problem (sorry if this is a naive
question) :

I'm trying to make Tomcat 3.2.1 to invoke a servlet (class myServlet in
package com.mycompany) 
whenever I use this URL: http://myServer/myServlet
In order to do that, I've added to the $TOMCAT_HOME/conf/web.xml:

    <servlet>
        <servlet-name>
		myServlet
        </servlet-name>
        <servlet-class>
            com.mycompany.myServlet
        </servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>
            myServlet
        </servlet-name>
        <url-pattern>
            /myServlet
        </url-pattern>
    </servlet-mapping>

However, all I get is a 404 error when I try the URL above mentioned. The
class com.mycompany.myServlet is in
the CLASSPATH, and this used to work with Tomcat 3.1, so I don't know what
I'm doing wrong.
One thing I noticed is that the classes
org.apache.tomcat.servlets.DefaultServlet and 
org.apache.tomcat.servlets.InvokerServlet are no longer part of
$TOMCAT_HOME/lib/webserver.jar, although they
continue to be mentioned in the default $TOMCAT_HOME/conf/web.xml file. Can
this be the cause of this problem ?
One other thing I noticed is that the $TOMCAT_HOME/conf/server.xml file has
an entry like:

        <RequestInterceptor 
            className="org.apache.tomcat.request.InvokerInterceptor" 
            debug="0" prefix="/servlet/" />

If I remove or comment that, the servlet examples which come with the
distribution stop working (i.e., the servlet 
examples work because of this entry, and not because of the
$TOMCAT_HOME/conf/web.xml file).
Thanks in advance for any help,

Wesley 


Mime
View raw message