tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sexton, George" <>
Subject RE: Where should i put dynamically generated graphics
Date Thu, 29 Aug 2002 23:05:31 GMT
It depends. One way I have done it is to have the generator servlet save it
on the session, and have the page the generator servlet writes make a
request to a simple servlet that returns the graphic, and then deletes it
from the session.

Another way would be to write it to the temp dir. From the Servlet API Spec:

SRV.3.7.1 Temporary Working Directories
A temporary storage directory is required for each servlet context. Servlet
containers must provide a private temporary directory per servlet context,
and make
it available via the javax.servlet.context.tempdir context attribute. The
associated with the attribute must be of type

Then, using a servlet mapping request the generated image and have the
servlet retrieve the temporary image.

I guess that you could make another dir writable to the server, and store
the image in their natively.

George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
Voice: 303 438 9585

-----Original Message-----
From: Andy Wagg []
Sent: 29 August, 2002 4:01 PM
Subject: Where should i put dynamically generated graphics


I have a web application that generates a gif file that is then
subsequently displayed. It expects to find the gif file in the context
of the web application. The web app is deployed as a war so obviously
the generated files cant be put there. Any suggestions as to where these
files could be copied that would be accesible by the browser.

Thanks in advance.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message