aspose file tools*
The moose likes Struts and the fly likes Help with File download Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Help with File download" Watch "Help with File download" New topic
Author

Help with File download

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
I am using File upload and download in my application.
When i try to download the file browser IE6 gives two options. open and save. when i click open it gives an error with the mmessage.

cannot find file filename in some temp location. do you want to open a ne w file. Is this because i have to set some thing in my action class? please help me on this.

regards
Surendar prabu


SCJP 1.4
surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
I am sorry to push this post forward. But this one is urgent. If anyone has got some idea please help me with this.
surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
I have solved this by not setting this response header "cache-control". But now if my dowload file type is .txt i am not getting a prompt and the browser opens the file automatically on click. Can i set some response header which will force the browser to prompt before the file is being opened?

regards
Surendar prabu
Deepak Shah
Ranch Hand

Joined: Nov 29, 2000
Posts: 97
Are you setting content type in header.

How are you downloading the file, is it direct link to the file or you are writing it to response (through servlet or JSP)?

I just worked with file upload/download without any problems (for different file types, XML, XLS, PDF, CSV and off course HTML)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with File download