I have found a solution:
http://<myHost>/myweb/servlet/Test but I had to modify the web.xml
    <servlet-mapping>
      <servlet-name>MainServlet</servlet-name>
      <url-pattern>/servlet/MainServlet</url-pattern>
    </servlet-mapping>

Well this is not very satisfactory,

Gérard,

Gerard BORREILL wrote:

> Sorry,
>  But in fact I have not solved the problem yet.
>
>   The url I used is http://<myHost>:8080/myweb/Test
>   This does not correspond to what I have understood in the Tomcat
> documentation.
>   8080 is the port number used by tomcat for Http requests, so Apache is not
> used.
>
> I have in mly servlet.xml:
> <Connector className="org.apache.tomcat.service.PoolTcpConnector">
>             <Parameter name="handler"
>
> value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
>             <Parameter name="port"
>                 value="8080"/>
>         </Connector>
>
> But I still do not know what URL to use to deal with Apache and make it
> dialogue with Tomcat using mod_jk.
> I tried:
>
>  http://<myHost>:80/myweb/servlet/Test
>
> But it fails on my client: it is a java client that sends an HTTP POST form.
>
> HttpClient: sendForm(): openConnection OK !! // it means a new URL object has
> been created.
> HttpClient: sendForm(): set property on urlconnection OK !
> HttpClient: sendForm(): object sent OK !
> java.io.FileNotFoundException: http://XXX.XXX.XXX.XXX:80/myweb/servlet/Test
>         at
> 
>sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:545)
>
>         at x.xxxx.HttpClient.sendForm(HttpClient.java:463)
>         at tests.x.xxxx..HttpClientTester.main(HttpClientTester.java:129)
>
> In my Tomcat logs I have: (this is the only URL that produces such a log).
> 2001-03-09 09:33:32 - Ctx( /myweb ): 404 R( /myweb + /servlet/Test+ null)
> null
>
> So apache deals with tomcat, but there is a mis-configuration and I do not
> know where.
> Does anyone knows how to interpret this line ?
>
> Gérard,
>
> Georges Boutros wrote:
>
> > --> How did you do to reach your servlet with tomcat???
> > thanks
> >
> > OK I have found it
> >
> > Gerard BORREILL wrote:
> >
> > > Hello,
> > >   There is probably something I do not understand, but I can't manage
> > > making my servlets reachable with tomcat .
> > > I am using Tomcat 3.2.1 with apache on Solaris. So I have generated the
> > > mod_jk module.
> > >
> > > I have set in the web.xml file of my servlet :
> > >     <servlet-mapping>
> > >       <servlet-name>MyServlet</servlet-name>
> > >       <url-pattern>/Test</url-pattern>
> > >     </servlet-mapping>
> > >
> > > So I presume that the URL to my servlet should end with"/Test"
> > >
> > > My .war file (myweb.war) is under
> > > ../dist/tomcat/webapps/
> > > and is uncompressed when I start Tomcat.
> > >
> > > The servlet is started (the init() method is called). So it means it is
> > > installed in the right place and Tomcat knows where to find it, and the
> > > servlet does not crash when being started.
> > >
> > > What URL should I type to call my servlet ? I am using a little java
> > > client that sends data to the servlet.
> > >
> > > I have tried
> > >
> > > http://<myHost>/myweb/Test
> > > http://<myHost>/myweb/servlet/Test
> > > ans so many others...
> > >
> > > But my client still fails to reach the servlet. (Error 404 file not
> > > found) What's wrong ?
> > >
> > > In advance, thank you,
> > >
> > > Gérard
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, email: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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

Reply via email to