A file writing dilemma....!



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

.



Relevant Pages

  • Themes und Images
    ... die Möglichkeiten die Themes bieten sind wunderbar, aber es gibt eine Sache die ich vermisse bzw. bislang nicht gefunden habe. ... In einer WebApp muss ich an diversen Stellen Images anzeigen, die weder per CSS noch per Skins definierbar sind, weil sie von Datenbankabfragen abhängig sind. ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Themes und Images
    ... In einer WebApp ... muss ich an diversen Stellen Images anzeigen, die weder per CSS noch per ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Re: Memory increase over time
    ... The CLR has been unable to transition from COM context ... pumping Windows messages. ... responsive or memory usage accumulating continually over time. ... If I have a smaller amount of images to print the printing *starts* ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Government finally names the day for porn ban
    ... If taken out of context, ... Section 63 does not apply to excluded images. ... images contained in a recording of the whole or part of a classified ... work in respect of which a classification certificate has been issued ...
    (uk.legal)
  • Re: so forth is useless except for limited mem environments?
    ... I regularly work with uncompressed images of that size or greater, ... code where maintainability rules are enforced vs. the sort of code ... C provides more context in many cases. ... to be able to justify using Forth in a corporate environment, ...
    (comp.lang.forth)