tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herold, Thomas" <ther...@libra.de>
Subject servlet invoking
Date Thu, 25 May 2000 13:51:09 GMT
I' m new to tomcat, and my question may be answered already, but I can't
find the answer :-(

I wrote a litte servlet, and have done all the mappings - I think so,
but it doesn't work.

The servlet is called ChatServlet.

I modified the server.xml  

<Context path="/chat" docBase="webapps/chat" debug="0" reloadable ="true">
        </Context>

tomcat-apache.conf

Alias /chat /usr/local/tomcat/webapps/chat
<Directory "/usr/local/tomcat/webapps/chat">
  Options Indexes FollowSymLinks
</Directory>
<Location /chat/WEB-INF/ >
  AllowOverride None
  deny from all
</Location>

and last the web.xml in chat/WEB-INF (the class is inside classes)

..
<web-app>
    <servlet>                    
	<servlet-name>ChatServlet</servlet-name>
    </servlet>
    <servlet-class>ChatServlet</servlet-class>
    <servlet-mapping>
        <servlet-name>ChatServlet</servlet-name>
        <url-pattern>/ChatServlet</url-pattern>
    </servlet-mapping>
</web-app>

 
When I try to invoke the servlet with http://localhist:8080/chat/ChatServlet
I get an 404 error.

Trying it with an html file

<html>
<body>
<a href ="../servlet/ChatServlet"> Hello </a>
</body>
</html>

I get also an error.

The mistery is that all examples which come with tomcat 3.1 work well.

Does somebody knows the solution ?

Best regards

Thomas M. Herold



Mime
View raw message