tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <Jacob.R.Kj...@syntegra.com>
Subject RE: servlet invoking
Date Thu, 25 May 2000 15:51:35 GMT
In your Web.xml, your ending </servlet> tag is in the wrong place.

Should be:

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

Also, I'm not sure if you were saying that you edited the tomcat-apache.conf
or not, but that is NOT for you to edit.  At least not be default. Tomcat
recreates that file every time it is started unless you specifically set it
up not to.  Not sure if you knew that or not.


Also, in you tomcat.conf file, you may need to add the following if you are
running Tomcat through Apache web server:

ApJServMount /chat  /root

I have not been able to get any servlet running without adding that.  I am
somewhat of a newbie myself, but I've figured a few things out over the past
week or so.

hope that helps.


Jake

-----Original Message-----
From: Herold, Thomas [mailto:therold@libra.de]
Sent: Thursday, May 25, 2000 8:51 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: servlet invoking


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



--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message