Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts Action - Download File - Forward to JSP

843841May 20 2005 — edited Jan 11 2008
I am writing a struts application. I have a jsp that has a multiple links to an Action.

The action must grab a file from an archive database. Write the file to a temp directory. Then write the client to the response so that the user can open/save the file. Then delete the file from the temp directory and forward to a notification screen.

I already have written the link, written the code in a servlet to get the file and write it to a temporary dir and delete it at the end of the action. However, I can not seem to allow the client to open/save the file.

Can anyone please help me write a java.io.File to the the client response so that it can be saved.

Thanks,

DeltaCoder
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2008
Added on May 20 2005
12 comments
6,065 views