swamy007 wrote:
My question is while we uplaod some image it got refelected in the database
but we are not able to view the image. Only after deploying the project in
netbeans it is been viewable.

A file uploaded to your server by a browser as part of a POST is put in a temporary location for the duration of the processing of that request, and is removed immediately thereafter. Should you want to persist that file beyond the duration of the initial POST, you should copy it elsewhere. Note, while often a deployed web application corresponds to a directory on disk, it is not guaranteed to contain anything not in the initial .war. I would not recommend storing files there as they could get wiped out by a redeploy, and won't be present on another server should you employ loadbalancers, etc. You should store the file someplace that is known to be readable/writable by the server, and non-volatile. You can either map a certain url tree to that statically served area, or better yet receive all requests for it as normal requests, validate that the object should be available to that user, and return a stream result of the requested file.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to