tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Egor Samarkhanov <>
Subject Re: Single virtual tomcat application which serves multiple contexts
Date Fri, 20 Jan 2012 17:32:22 GMT

Thanks for your notes! Please see my comments inline.

AW> Personal opinion:

AW> By putting some considerable effort into it, it is certainly possible to do something
AW> that, by rewriting URLs and/or proxying and/or making all your pages refer to the context

AW> etc..

AW> But the question is : why ?
AW> If
AW> - you have many, many "clients"
Yes, I do have really many clients, and hope to get even more.
And in future I'd like to implement a failover solution with Tomcat
cluster. If i have these many applications deployed, then they will
be deployed on all nodes. I guess it would be much better if one
node contains a single application which can serve any client
(plus session replication). This way the cluster would be more

AW> - or you application is so big that having multiple copies of it totally fills your
It's pretty big, but the disk space is not the real concern, but
the memory. Many deployments of the same application consume lots of

AW> - or your application for "client1" needs to share data with the application for "client2"
No, it doesn't.

AW> then it may be worth thinking about this.

AW> But otherwise, you probably would immensely simplify your life by using a separate
AW> host for each client, and have for each virtual host a separate appBase, in which you
AW> deploy a copy of your application.

By the way, I was thinking about virtual hosts, but I didn't find any
solution yet to add new virtual hosts at runtime (to tomcat, or to apache

AW> Think of the security issues otherwise, to avoid one client being ever able to access
AW> data of another;

Good point.

AW> or think of what happens when one of these clients in the future asks you
AW> for that little change just for him.. etc..

Yes, thinking about it all the time. But we didn't have such cases for
2 years, and if it happens - we would deploy the customized version to
some other, separate environment.

So, where do I start if I decide to go with the single virtual
application? Did someone try doing such things?

Best regards,
Egor Samarkhanov (
Actimind, Inc.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message