tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: multiple instances and context roots
Date Thu, 26 Jun 2008 13:15:03 GMT

----- Original Message ----- 
From: "tom_goring" <>
To: <>
Sent: Thursday, June 26, 2008 12:09 PM
Subject: multiple instances and context roots

> Hi,
> I've posted this on the jboss forum but had no response... it's really a
> tomcat question.
> jboss-4.2.2 (not sure of the tomcat version used)
> I have several jboss installs running behind apache using mod_jk (dev, 
> test,
> production, etc)
> I can't use virtual hosts as all my instances require SSL and this is only
> set up for 1 domain. Each instance runs on it's own ports.
> I want a simple way to tell each jboss/tomcat instance to use a reliative
> context.
> E.g.
> I.e. I want to know where I can set dev/test, etc.
> I don't really want to change the application.xml (context-root) for each
> EAR file when installed (as that would require rebuilding the EAR 
> dependent
> on the instance).
> Ideas ?

Tom, I have no knowledge of Jboss... we dont use EJB at all, so I'm just 
going to tell you what TC does to get sub contexts, and then you on your 

Say you want /dev/MyApp
The context file name in conf/host  becomes


The path in the context file becomes


And in webapps folder it becomes

/dev/The UnPacked Webapp

Deployment is not possible by dropping a war into tomcat... the war must not 
be there, else TC will auto deploy and mess up your config.

Then I "guess" JkMount /dev/*  theWorker.....  may work...

And hopefully nothing in those apps is hardcoded... like URI's in jsp pages 
And EJB is still happy...

Some really creative guy Alex Mestiashvili showed us a way (unrelated) to 
map different IP's to different webapps a while back using a reverse proxy 
and some other incredible rewrite stuff that Apache can do... JK works on 
relative uri's, but I think its worth a bash asking the Apached guys if one 
cant map



Or something even more creative... ie try get apache to present TC/JBoss 
with something it likes...
Maybe mod proxy has a few tricks that jk does not... worth getting into the 
Httpd mailing list and asking, I think.
JK is terrific at load balancing, but you just trying to use it as a kind of 
gateway... Apached is probably good at that.

Good luck.... sorry cant be more helpful

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message