Hi,

I did the same but I stored images in Oracle database in BLOB fields as I was sure of 
the size of the images.
I can give you the snippets of the servlet if u want to use BLOB.
Else I can give you the snippets for uploading files in a folder in Unix Env 
(/context/pics/*)
Cant say which option is best for you ..
Let me know your decision.

Best Regards
Abhay Kumar

-----Original Message-----
From: Parsons Technical Services [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 17, 2004 5:30 PM
To: Tomcat Users List
Subject: A plan to access files outside the context/Tomcat?


I have a need to place and get, image files, to and from a directory outside of the 
context and outside of Tomcat.

My plan is this:

Have an upload page to allow user to select local file on client and upload to server. 
This is the same tactic as the manager is using with war files.

The folder will have rights set to allow read/write by Tomcat user.

This part, I think, will be staight forward. OK so far??

Next to retrieve the image and serve it back to the client is a little more involved.

The plan:

Servlet to accept all request for the /context/pics/* .

Servlet reads file from directory and writes it out to the Servlet output stream.

Am I nuts or is this a feasible plan?

Just need to know if I am going in the right direction and if anyone has any code 
snippets of the servlet writes.

As for the file I/O I have that covered I think.

Any/all comments welcome.




---------------------------------------------------------------------
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