The only place you can count on existing for writing is the tempdir defined by the servlet container.


File temp = (File)context.getAttribute("javax.servlet.context.tempdir");

Otherwise, you can set up a deployment parameter for your deployer to configure that specifies a directory for writing. This can be either a JNDI environment variable or a context parameter. You can set up defaults in the web.xml and the deployer can override these with proprietary server configuration.

Jake

At 06:34 PM 1/1/2004 -0500, you wrote:
I am storing images to db as a blob. I want to cache the images to files so I do not hit the db everytime.

Question: How do I write to a file... when I am deploying a war file?
Where am I allowed to write and delete w/ a Servlet 2.4 (again... a war file).

tia,
.V



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to