Skip to main content

Where to store generated images?

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2010-02-26

I have an glassfish app that generates images depending on user request.
These images are then delivered back to the user via <img> tags.
Where is a sensible place to store generated files like this?
Currently they are in the application directory, but they get deleted whenever I upgrade and deploy a new version of the app.
I want them to survive re-deployment & be resused without having to generate the images again.
It is not clear to me how I can access them via <img> tags if they are outside the application directory.
Apologies if this is a really dumb question, but any help would be much appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-02-26

OK, I've just discovered "alternatedocroot_1" which seems to do the trick.
<property name="alternatedocroot_1" value="from=/images/* dir=/mydatadir"/>