tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Rubdi" <>
Subject Re: How to share static content across multiple tomcat webapps
Date Tue, 01 May 2007 15:16:01 GMT
Hi Martin,

On 5/1/07, Martin Jones <> wrote:
> Thanks for the reply.
> After mulling this over, I've thought of another way to do it
> (apologies if I'm not using the correct terminology here).  Have the
> static content in a single directory on my development machine, then
> use my Ant build script to have the contents included in the .war
> file.  Then, when I make any changes to the static content, I just
> have to rebuild and redeploy .war files for each webapp I'm running.
> There would be multiple copies of sidebar.html and images, etc. on the
> server, but that wouldn't matter as I would never edit them directly.
> This seems like a good compromise - any thoughts?

It depends, if you have 10 different websites, then it would create 10
different copies. It may or may not become a maintenance nightmare in
the future.

I think this thread has a few
good suggestions.

1) one poster (post #6 from the top) suggested creating a separate
webapplication (Context) to hold only the common static resources
(html, images etc) and set crossContext="true" only for that static

2) some have suggested creating a Filter for this, I don't know about
Filters yet but it seems like a possible solution.

> Thanks,
> Martin


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

View raw message