A
andrew.kitchen
Hi,
I have a webapp that I deploy using a WAR file. This application needs
to write image files to disk when I upload images. These images
currently reside in my webapp, but of course this causes problems when
I want to deploy a new WAR as it throws the images away.
What I believe is the solition is to write the images to a different
context so that they will not be overwritten, rather than write the
images to a database. I don't need to link to these images directly
from my webapp's JSP as I will read the images in so that I can
dynamically create thumbnails and watermark them etc....
I have set-up a new context for the images and my webapp can connect to
it. However I cannot find any code or such that shows examples of how
to write or read files from another context. Can you do this from
within your main webapp, or do you need to invoke a servlet in the
other context to provide file IO?
Any help gratefully received
thanks in advance.
Andrew
I have a webapp that I deploy using a WAR file. This application needs
to write image files to disk when I upload images. These images
currently reside in my webapp, but of course this causes problems when
I want to deploy a new WAR as it throws the images away.
What I believe is the solition is to write the images to a different
context so that they will not be overwritten, rather than write the
images to a database. I don't need to link to these images directly
from my webapp's JSP as I will read the images in so that I can
dynamically create thumbnails and watermark them etc....
I have set-up a new context for the images and my webapp can connect to
it. However I cannot find any code or such that shows examples of how
to write or read files from another context. Can you do this from
within your main webapp, or do you need to invoke a servlet in the
other context to provide file IO?
Any help gratefully received
thanks in advance.
Andrew