Issue in downloading Binary File on Safari 5 (MAC OS)

Hi,
We are working on an application, which download binary file when clicks the button, when i am using Safari 6 the below code snippet download file successfully.
Image:
Safari 6: on clicking Export file downloaded:
code:
String userAgent = request.getHeader("user-agent");
            if (userAgent.toLowerCase().indexOf("mac") >= 0) {
                response.setContentType("application/octet-stream");
            } else {
                response.setContentType(TEXT_CSV);
            // These Lines were added to make it work on the secure https
            // connection
            response.setHeader("Pragma", "public");
            response.setHeader("Cache-Control", "max-age=0");
            response.setHeader("Content-Disposition", "filename=contacts.csv");
but when we use safari 5 on MAC its not downloading the file, it simply display the content on browser it self
Image:
and file is not downloaded in this case, can some one tell what should be the contentType(""); should be set to download the file in Safari 5, so that the file can be downloaded in case of Safari 5.
Thanks in advance:)

You can set content type to:
response.setContentType("application/vnd.ms-excel");
file will download on safari 6

Similar Messages

  • When I download pdf files in Safari I get a black screen.  However, if I open a pdf in Mail it is viewable in Preview.  How do I fix this?

    When I download pdf files in Safari I get a black screen.  However, if I open a pdf in Mail it is viewable in Preview.  What is wrong?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste (command-V) into the text box that opens, then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    I've seen an unconfirmed report that the "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you might need to remove it as well, if applicable.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • How do I download PDF files using Safari.  All I get is a black screen.

    How do I download PDF files using Safari.  All I get is a black screen.

    Back up all data.
    Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • HT5701 Cannot download pdf files with Safari 6.0.4?

    Cannot download pdf files with Safari 6.0.4

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Unable to download any files in safari despite having 18.5 GB available

    Help! When I try and download any file from Safari I get the following message;
    "Safari could not download the file "File name" because there is not enough free disk space"
    with the following advice,
    "Try deleting documents or downloading to another disk."
    It does not allow me to download to another disk. Surely there is something amiss? Please help...

    You normally need admin rights to be able to install/copy things into the Applications folder - I'm guessing the current user you are using isn't an admin?
    Most people set a specific downloads folder somewhere on their drive to keep all the 'clutter' together, but each to their own

  • My Windows7 PC just crashed.  I have the files backed up online with Carbonite.  I want to buy a Mac I book.  Carbonite says it cannot download pc files to a Mac.  Is there a solution?

    My Windows7 PC crashed and I have the files backed up online with Carbonite.  I want to buy a Mac I book.  Carbonite says it cannot download pc files to a Mac.  Is there a solution?

    Brilliant, that clears things up - there is a single
    audio in that is next to the PC in so I guess I need
    one of the single cables you have mentioned,
    hopefully the Apple Store can point me in the right
    direction when I go in to buy my Mini.
    If the TV has a single minijack-type audio input, then the cable you need is a very standard one that can be found almost anywhere that cables for audio/home theatre systems are sold. In the old days it would be easy to point you towards the nearest Tandy, but as I understand it they're now gone. However, even supermarkets such as Tesco are likely to have something this basic!
    No doubt Apple will release an Intel Core 2 Duo
    version the day after I pick it up.
    There's no doubt that at some point Apple will revise the range and make new mini's faster or more powerful - and it may be that it happens next week at the Macworld Expo. I'd bet there are a few people holding on for a few days to see if new minis are announced there, and you might want to do the same if it's of concern, but the existing models are plenty powerful, and more than enough for most user's needs.
    Thanks for all your help, much appreciated.
    You are most welcome - and please come back and post again if you have any further questions or any problems once you've got your system!

  • I cant download any file from safari on my ipad 3 WI-FI it gives me safari can't  download this file

    I can't download any file from safari on my ipad 3 why
    It gives me : safari cant download this file

    Hi Morning mist,
    If the app did not specifically indicate that it was available from the iTunes & App Stores then, as Diavonex indicated, you cannot download it.
    The App Store has 2 free Heartmath apps for the iPad - Inner Balance, and HeartQuotes HD. You can click on your App Store icon and find them under Heartmath in the Categories search bar.
    Not sure what you might have paid for?
    Cheers,
    GB

  • I am trying to download a file from Safari. It doesn't work.

    I am trying to download a file from Safari. It doesn't work. It always comes up with a notification saying, 'Safari could not download this file'. Why does it do that? More importantly, what should I do? how do I download it?
    Thanks to the users who reply to this. It will help me a lot.

    What type of file is it?
    If safari can't natively open the file, or there is no App installed thatr can, it won't download.

  • Issues opening downloaded docx files from the internet on my mac air...

    I have owned my Mac Air for nearly 1.5 yrs and never had an issue, until yestrday.
    I can download docx files from the internet no problem, but when I go to open them (after they have saved into my downloads folder) a pop-up window with "convert file from" appears? Alas I can not open any downloaded docx files from the internet/email etc! This is making work very difficult.
    Any suggestions would be greatly appreciated!

    that explains a lot, you didnt mention that critical part before.  I upload a lot to FTP sites as well
    originals fine.... but thru the server theyre corrupted, .....that narrows everything down.
    have you contacted sys admin for the server about this?
    see here:
    http://stackoverflow.com/questions/2477564/why-are-docx-files-being-corrupted-wh en-downloading-from-an-asp-net-page

  • When downloading a file from Safari, it goes to downloads and you can't re-name the file before it is saved

    I am new to MAC and have trouble when downloading files from Safari that I want to save to a particular folder with a new name.  Can you do that without first saving to downloads, then moving the file to the documents stack, then changing the name?

    Although the right-click contect menu has "Download linked file as" and you would think that would allow you to rename the file as it is downloaded, it always gives me a useless html file.  Maybe I am misunderstanding what that menu item actually does. I long ago gave up on renaming files during download. So I'm as curious as you about whether it can be done.

  • PDF PROBLEMS!  Not able to download PDF files into Safari anymore?!?

    I was always able to download PDF files into Adobe Reader from the internet. I can't download them anymore...My MacBook keeps trying to load and reload the page, but never does it. I downloaded the most recent Adobe Reader 9, but this did not fix the problem. I can open PDF files I have saved, but can' t download them in Safari. Any ideas? Thanks-

    Hi Jes,
    I get an error message saying
    "The page cannot be found"
    infact when i hover the mouse over the link i am able to see the correct path and the correct correct values as follows
    schema.procedure?V=04&C=001
    but when i click on it, i get the error as above.
    i am not sure whether it is any permissions issue in linux. or is the procedure not getting executed properly at all.
    but iam able to read those pdfs and insert them into an oracle table.
    but just not able to download them back again.
    but exactly the same code and same tables etc work in windows.
    Thanks,
    Philip.

  • Cannot download any files from Safari 6.0.1 (Mountain Lion)

    Hi, I have had an ongoing issue with downloading files from Safari 6.0.1. When I click any links (even from emails) to download various files from pdfs, zips to photos, firmware etc, Safari opens a new tab with the file URL in the navigation bar. However, the tab is a blank gray window, and the download does not begin. I have been copy pasting the links into firefox and the downloads work fine. Would rather be using safari though and its rather annoying to be opening a separate browser anytime I need to download a file. Any ideas?
    Thanks.

    Select Help ▹ Installed Plug-ins from the Safari menu bar. Besides the following, what plugins are listed?
    iPhotoPhotocast
    Java
    QuickTime
    Shockwave Flash
    WebKit built-in PDF

  • Itunes won't download, binary file won't save to computer.

    Every time I click on the "Download Now" button, I am able to select what folder I want to download the binary file to.
    Once I click save, nothing else happens. I am taken to the "Thank you for downloading itunes" screen, but there is no record of my download anywhere, and the file is simply not saving.

    So weird...I don't know why so many folks have this problem. Why won't the silly file download from Apple? When I click "save file" absolutely nothing happens. A dialogue box should pop up asking me where to save it.
    My solution was to finally download it from one of the many file servers. I used one called "filehorse" and it downloaded right away.
    How can one use their nifty iOS device if they can't install itunes on their computer?!
    I tried the recommended "fixes", one of which included deleting the "temp" folder (which was not so easy to delete, required booting to safe mode command prompt) but made no difference. This was all using Firefox. IE is the only other browser on my computer, which seems to be permanently broken (most sites do not show properly even after using IE's "reset" feature).
    I refuse to install Chrome, I tried it once and it sucked. Hopefully Apple will fix this silly issue so that next time I need to download iTunes, I can do it. Thank you!

  • Problem downloading pdf file in Safari

    My website has a link which downloads a pdf file, which opens in a new browser window. In OS X, this works properly using the latest Safari update (4.0.5), as well as in Firefox and several other browsers (the file opens in Preview). I also run Windows XP using Boot Camp. I updated Safari to 4.0.5 in Windows, and also installed the latest version of Adobe Reader. But when I link to the pdf file in Windows using Safari, the program freezes. Both Firefox and Internet Explorer download the pdf file properly in Windows (the file opens in Adobe Reader).
    I'm pretty sure that earlier Windows Safari versions correctly downloaded pdf files. Could this be a problem with Safari 4.0.5? Is there plugin in the new Safari that I'm missing, or something that needs to be set in either Safari or Adobe Reader?

    I went through the recommended uninstall/reinstall procedure, but unfortunately it didn't fix the problem. When I first ran the new Safari install and clicked on the link to download the pdf, it opened a new window with a message that it couldn't find the server on which the pdf file is located (but of course it's on the same server as the parent page). After churning (hourglass cursor) for a couple of minutes, the new page (now running Adobe Reader, I think) displayed a small cube with question marks (missing file). On subsequent tries, Windows shut down Safari as "not responding".
    I suspect that the problem is with Adobe Reader 9.3.1 and its interaction with Safari. (The other browsers continue to download the pdf properly.) I checked the Adobe site but didn't see an obvious way to install an earlier version of Reader, but willl investigate this further.
    Many thanks for your help. (I've been forced to learn more about Windows than I really wanted to know.)
    Charles Hearn

Maybe you are looking for

  • How to use tree tables with CRUD operation for begineers ADF 11g

    This is Friday night call for help. This is only few sample ressources on the web for tree table and only one with CRUD operation. I used this one http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html because this is the only one th

  • Date format in Bex Output should be changed while using with Text Variable

    I am using a Bex Query where have defined a Text Variable with replacement path. So whatever Date user enters in the selection screen variable (Input Variable) the same date appears in the report description. For Ex: If user enters 30.04.2012 in Char

  • How to arrange textfield in vertical way in a panel???

    Suppose I want to arrange textfield text1, text2 and text3 in a panel so that text1 is in the first line and text2 in the second line and text3 in the third. How can I make this? Thank you.

  • LMS 3.2/3.1 : local/regional us windows installation prerequise

    Hi, I have installed a windows us with french local and LMS 3.1. When I try to upgrade to LMS 3.2, it failed because locals were french. I changed local to us, and now I can install LMS 3.2. I would like to know if I can keep this installlation or do

  • Unable to make a purchase

    I get this error when trying to purchase a app in the App Store "Your Purchase Could Not Be Completed"  I have a $50 balance in my account, and the app is $2.99 I'm new to apple, my first iPad, my first gift card, my first account, never had this pro