tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hugh O'Brien" <hu...@intelis.com>
Subject Re: servlet invoking
Date Thu, 25 May 2000 15:37:52 GMT
"kc.baltz" wrote:

> Two things.  First, in your web.xml in the <servlet> tag, you don't have a
> <servlet-code> tag.  This may be optional if your servlet is not part of a
> class, but it's not if it is.  Second, you reference your servlet by the URL
> /servlet/ChatServlet.  But your <servlet-mapping> says it is mapped to
> /ChatServlet.  I think the correct URL based on the files you included would
> be http://yourhost/chat/ChatServlet
>
> K.C.
>
> > -----Original Message-----
> > From: Herold, Thomas [mailto:therold@libra.de]
> > Sent: Thursday, May 25, 2000 9: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
> >
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

K.C.

What would the "action" attribute look like on a form tag for this same
example.?

<form name=foo action="?" >

Hugh W. O'Brien
Java Enterprise Developer @ Intelis

Mime
View raw message