where put images files in big multimodules web app

843 views Asked by At

I have big WEB application (jsp). What is the best way to put images files? Where to put images files in multi modules web application?

I have many images so I would like to have easy, separate access to modify them. The best way will be some separate project which I can redeploy without stop my main application part. Is this solution acceptable?

1

There are 1 answers

4
Bozho On BEST ANSWER

Yes, it is completely acceptable. You can create an "assets" project, and have images/module1/, images/module2/ folders, etc.

Just, in your main application, you will need to configure the path to the assets application. It can even reside on a different host. For example http://assets.yoursite.com. And then in your main application you'll have:

<img src="${assetServer}/images/module1/logo.png" />

(the assetServer request attribute may be put there and configured in multiple ways, depending on the setup and your preferences. One example is - configure as context-param in web.xml, and put in the request by a filter)