tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinay Menon" <j...@vinay.org.uk>
Subject Re: Using the <servlet> element on web.xml to define short name f or a servlet in a package
Date Fri, 29 Jun 2001 23:04:51 GMT
You will need mod_jk.

Under your tomcat/doc directory, you should have information on setting up
Apache to talk to Tomcat.

Applications will need mapping like

JkMount /appname/servlet/* ajp13

To pass on the request for servlets to the ajp13 connector.

Vinay
----- Original Message -----
From: "Eitan Ben Noach" <EitanB@proficiency.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Saturday, June 30, 2001 12:57 AM
Subject: RE: Using the <servlet> element on web.xml to define short name f
or a servlet in a package


> Thanks Bill,
>
> As I stated on my replay to Michael Wentzel your suggestion really helped.
>
> What should I do to make this work also when the HTTP server is Apache?
> Currently it does not working ( only on standalone mode ).
>
> Eitan Ben-Noach
> Proficiency, Ltd.
>
>
>
>
>
> > -----Original Message-----
> > From: William Kaufman [mailto:WKaufman@viquity.com]
> > Sent: Friday, June 29, 2001 11:17 PM
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: RE: Using the <servlet> element on web.xml to define
> > short name
> > f or a servlet in a package
> >
> >
> > Try adding,
> >
> >     <servlet-mapping>
> >         <servlet-name>
> >             controller
> >         </servlet-name>
> >         <url-pattern>
> >             /something
> >         </url-pattern>
> >     </servlet-mapping>
> >
> > to your web.xml.  Then,
> >
> >   http://localhost:8080/something
> >
> > should work.
> >
> >                                         -- Bill K.
> >
> > > -----Original Message-----
> > > From: Eitan Ben Noach [mailto:EitanB@proficiency.com]
> > > Sent: Friday, June 29, 2001 2:03 PM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: Using the <servlet> element on web.xml to define
> > > short name for
> > > a servlet in a package
> > >
> > >
> > > Hello,
> > >
> > > I'm running standalone tomcat.
> > >
> > > I'm trying to use  the <servlet> element on web.xml to define
> > > short name for
> > > a servlet in a package, but it doesn't work.
> > >
> > > I put a package called FTPExplorer.jar under
> > > /admin/web-inf/lib containing
> > > the servlet named
> > > com.company.ftpexplorer.FTPExplorerServlet.class
> > >
> > > When calling the servlet with following URL:
> > > http://localhost:8080/admin/servlet/com.company.ftpexplorer.FT
> > > PExplorerServl
> > > et
> > > the servlet works ok.
> > >
> > > I've defined the following <servlet> element on the main
> > > tomcat web.xml
> > >
> > > <servlet>
> > > <servlet-name>
> > >             controller
> > >         </servlet-name>
> > > <servlet-class>
> > >             com.company.ftpexplorer.FTPExplorerServlet
> > >         </servlet-class>
> > > </servlet>
> > >
> > > When trying to call the servlet with either URLs:
> > > http://localhost:8080/controller
> > > http://localhost:8080/admin/servlet/controller
> > >
> > > Tomcat can't find the servlet ( 404 )
> > >
> > > What is wrong ?
> > >
> > > Thanks,
> > > -----------------------------
> > > Eitan Ben-Noach
> > > Proficiency, Ltd.
> > >
> > > Tel: +972.2.548.0287
> > > Fax: +972.2.586.3871
> > > email: eitanb@proficiency.com
> > >
> > > The Intelligence in Engineering Supply Chain Collaboration
> > > <http://www.proficiency.com/>
> > >
> > >
> > >
> > >
> > > >
> > > > we have the following configuration:
> > > > - Windows 2000 (Service Pack 1) (2, 4 and 8 processors)
> > > > - Apache 1.3.19 with mod_ssl 2.8.3
> > > > - Tomcat 3.2.2 (Apache and Tomcat are talking AJP13)
> > > > - We have a loadbalancer configured with 3 Tomcat workers
> > > > - Our load generating test clients are implemented using
> > > > HttpUnit 1.2.4 +
> > > > JSSE 1.0.2
> > > >
> > > > On heavy load (starting from 50 concurrent requests up to 200
> > > > concurrent
> > > > requests) we observe non-deterministic TCP/socket problems.
> > > > It seems that in almost every case, the only place where we
> > > > can see some
> > > > kind of exception is the mod_jk log file:
> > > >
> > > > ...
> > > > [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
> > > > [jk_ajp13_worker.c (173)]: In
> > > jk_endpoint_t::connect_to_tomcat, failed
> > > > errno = 61
> > > > [jk_ajp13_worker.c (584)]: Error connecting to the Tomcat process.
> > > > [jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error -
> > > > jk_tcp_socket_recvfull failed
> > > > [jk_ajp13_worker.c (619)]: Error reading request
> > > > ...
> > > > [jk_ajp13_worker.c (271)]: read_into_msg_buff: Error -
> > > > read_fully_from_server failed
> > > > [jk_lb_worker.c (349)]: In jk_endpoint_t::service, none
> > recoverable
> > > > error...
> > > > ...
> > > >
> > > > Analysing the exceptions that are thrown from HttpUnit, it
> > > > looks like that
> > > > sometimes the socket cannot connect at all and sometimes
> > > the response
> > > > could not be retrieved completely. Most errors occur in the
> > > > early startup
> > > > phase of our load test.
> > > > Using netstat we can observe a *lot* of sockets in
> > CLOSE_WAIT state
> > > > connected to the AJP13 port.
> > > > The settings we use in our Apache configuration are as follows:
> > > >
> > > > ...
> > > > Timeout 300
> > > > KeepAlive On
> > > > MaxKeepAliveRequests 500
> > > > KeepAliveTimeout 300
> > > > MaxRequestsPerChild 0
> > > > ThreadsPerChild 500
> > > > ...
> > > >
> > > > I would appreciate, if there is anyone who has gone through
> > > > the same kind
> > > > of problems or if there is some kind of solution that may
> > > > help to solve
> > > > these problems. Perhaps, if there is someone with an equivalent
> > > > Linux-Setup, i would appreciate, if she/he could tell us some
> > > > of her/his
> > > > experience?
> > > >
> > > > Mit freundlichen Grüßen / Kind regards,
> > > > Norbert Klose
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >


Mime
View raw message