You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Sutton <bi...@ozewebhost.com> on 2005/04/20 09:06:00 UTC
Many hosts sharing servlets
I am moving from jserv to tomcat.
I have 100+ servlets and classes that I want to be available to up to 100
virtual hosts. The server I am moving to runs RHE3 with Apache2, Plesk and
Tomcat4. Plesk only supports the mod_webapp connector. I can't find much
info on mod_webapp but it seems to me that each virtual host must have its
own webapps deployed.
So I have tried to put all the classes into /var/tomcat4/shared/classes.
In each host, I deploy a servlets.war file that contains only the following
WEB-INF/web.xml file -
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Glogal servlets</display-name>
<description>
Global servlets.
</description>
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
This is working on the few hosts I tried so far. I can link to a servlet
using http://a-host.com/servlets/MyServlet.
Questions
Is there a better way to do this ?
Will tomcat be using hugely more memory than jserv was ?
Should I abandon Plesk, use Cpanel and configure apache/tomcat manually (but
I don't want to have to ssh in and configure each new host manually) ?
Thanks
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Many hosts sharing servlets
Posted by Bill Sutton <bi...@ozewebhost.com>.
Thanks for your quick reply. Yes I have read the pros & cons and I would
prefer not to use the invoker but the work in updating many webapps each
time a servlet changes is daunting, particularly using Plesk.
Bill
----- Original Message -----
From: "QM" <qm...@brandxdev.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, April 20, 2005 8:48 PM
Subject: Re: Many hosts sharing servlets
>
> On Wed, Apr 20, 2005 at 05:06:00PM +1000, Bill Sutton wrote:
> : I have 100+ servlets and classes that I want to be available to up to
> 100
> : virtual hosts.
>
> : So I have tried to put all the classes into /var/tomcat4/shared/classes.
> : In each host, I deploy a servlets.war file that contains only the
> following
> : [snip: web.xml with Invoker servlet]
> : Questions
> : Is there a better way to do this ?
>
> "Better" depends on your goals, but most a lot of people would say that
> using the invoker has its pros and cons. Mostly cons. =) (See the
> archives for why.)
>
> You could just JAR up the 100+ servlet classes and drop them in each
> webapp's WEB-INF/lib. Next, write something to create a set of proper
> <servlet/> and <servlet-mapping/> entries for those servlets. This is a
> one-time hit that will pay off long-term.
>
>
> : Will tomcat be using hugely more memory than jserv was ?
>
> Depends on your app. Only a load test + profiling will let you know.
>
> -QM
>
>
> --
>
> software -- http://www.brandxdev.net/
> tech news -- http://www.RoarNetworX.com/
> code scan -- http://www.JxRef.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Many hosts sharing servlets
Posted by QM <qm...@brandxdev.net>.
Please post a *new* message when writing to the list. Replying to
an old (unrelated) message confuses thread-aware mailers, which makes
your question harder to find (and thus answer).
On Wed, Apr 20, 2005 at 05:06:00PM +1000, Bill Sutton wrote:
: I have 100+ servlets and classes that I want to be available to up to 100
: virtual hosts.
: So I have tried to put all the classes into /var/tomcat4/shared/classes.
: In each host, I deploy a servlets.war file that contains only the following
: [snip: web.xml with Invoker servlet]
: Questions
: Is there a better way to do this ?
"Better" depends on your goals, but most a lot of people would say that
using the invoker has its pros and cons. Mostly cons. =) (See the
archives for why.)
You could just JAR up the 100+ servlet classes and drop them in each
webapp's WEB-INF/lib. Next, write something to create a set of proper
<servlet/> and <servlet-mapping/> entries for those servlets. This is a
one-time hit that will pay off long-term.
: Will tomcat be using hugely more memory than jserv was ?
Depends on your app. Only a load test + profiling will let you know.
-QM
--
software -- http://www.brandxdev.net/
tech news -- http://www.RoarNetworX.com/
code scan -- http://www.JxRef.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org