File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes POPING UP save/open option WHILE DOWNLOADING Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "POPING UP save/open option WHILE DOWNLOADING" Watch "POPING UP save/open option WHILE DOWNLOADING" New topic
Author

POPING UP save/open option WHILE DOWNLOADING

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
Please help
I want to download a txt file or may be any file from server.I want to pop up a save / open option before downloading.For this i guess i have to set the mime type
I have done like this
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="application/x-filler">
Do i have to do anything else??
coz this is opening the txt files in the browser itself
Thanks a lot
Moumita
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

What happens to a file sent to a browser depends on the Content-type and the browser. The browser maintains a list of MIME types (content types) and uses that list to determine what action to take.
You can use the Content-Disposition header to hint that the normal handling should be overridden. Most modern browsers will take the hint.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: POPING UP save/open option WHILE DOWNLOADING
 
Similar Threads
Question on NOT Cache....
Create Excel Attachment with Meta Tags
Close browser window
Force a file download in HTML
meta tags