On Thu, Oct 30, 2008 at 8:22 AM, Pid <[EMAIL PROTECTED]> wrote:
> Is your build process automated, say with ant or maven?
> If so, it should be a relatively simple one-off job to configure
> multiple output war files from one codebase with several configurations.

I'm developing with Eclipse but could configure custom build steps
with ant. This solution would remove most of the inconvenience, but I
would still have to make 4 separate WARs available for distribution.
Not *too* big of a deal but I'd rather just distribute a single
archive.

On Thu, Oct 30, 2008 at 9:44 AM, Caldarale, Charles R
<[EMAIL PROTECTED]> wrote:
> Read the doc:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Context%20Parameters
...
> The <Resource> element must go inside a <Context> element, but you can place 
> the <Context> in conf/Catalina/[host]/[appName].xml rather than in the 
> webapp's META-INF/context.xml file.  Again, read the doc:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Introduction
>
> Your deployment script will need to copy the site-specific file containing 
> your <Context> element to conf/Catalina/[host]/[appName].xml since that file 
> is removed when a webapp is undeployed.

Thanks for the advice and the doc link, this looks like the best
option. I was deploying the WAR through the Tomcat manager, I'll have
to change that (unless there's a way to configure custom deployment
steps through the manager?). Is there a way to keep it from being
removed when the app is undeployed?

On Thu, Oct 30, 2008 at 2:32 PM, br1 <[EMAIL PROTECTED]> wrote:
> The easiest way is to place Context and the different Resource elements into
> each Tomcat's server.xml file.
> Someone will tell you that it's not recommended, but it will just work.

That's not a bad idea, except it seems I can get around all of the
drawbacks Chuck mentioned with the low cost of putting the file in
conf/Catalina/[host]/[appName].xml instead. Although it's enticing,
since it's something I'd only have to set up once per server and not
think about again. For now this server is dedicated to a single web
application so restarting the server is not any worse than restarting
the web app.


Thanks for your replies,
Jason

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to