tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Deploying ROOT Context for variable .war filename
Date Mon, 08 Aug 2011 10:10:27 GMT
On 08/08/2011 10:30, jenskreidler wrote:
> Pid * wrote:
>> On 08/08/2011 09:56, jenskreidler wrote:
>>> Hi tomcat-users,
>>> using tomcat 7, is it possible to mount the ROOT context path for a .war
>>> file, where the .war file will have a variable file name, i.e. building a
>>> .war by a continuous integration server.
>>> For example, you get a myapp-3.2.0-20110809-build254.war, next day a
>>> myapp-3.2.0-20110810-build255.war and so on. 
>>> I'd like to convene with this ci-build ordering, the war file naming
>>> scheme
>>> and to automatic deploy the newest .war every night at the tomcat's ROOT
>>> context.
>>> Thanks in advance,
>>> jenskreidler
>> Use: ROOT##version.war
>> Where 'version' is an orderable string.
>> p
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> Using this, will only be the 'newest' ROOT*.war be deployed?

Yes.  Otherwise how would one know which new request was directed to
which app?

> However, using that scheme means that the war file is somewhat fixed to the
> pattern "ROOT##[0-9].war.

AFAIK any string will work.

i'd be better that in tomcat the root context
> could be configured using a directory, wherein the war file(s) reside, like
> docBase="<dir>".

What's the difference between what you're describing and current

but I've noticed that using that (in a context.xml or in
> ROOT.xml) you must also specify the file name, i.e.
> docBase="myapps/warfilename", in order to 'link' myapps/warfilename.war.

You can specify a filename or directory.

> I'd prefer a mechanism like a ROOT.xml with <Context
> docBase="myapps/*##version.war". 

Have you tried that?

That way, it would be possible to deploy
> war files with custom names and versions under any context (depending on the
> file name). Sure, if two different war files would reside in docBase, an
> exception should be thrown.

The docBase describes the location of either the war file, or the
exploded war file (ie directory).


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

View raw message