File Download from Secure Site

Hi ,
Am trying to download file from secure site. Am reading the file from DB and setting it in reponse. My code woks perfectly in non-secure site. But it doesnt work in secure site. Here is the piece of code am using. Pls help thru this.
String fileName, contentType,fileContent;
int fileSize;
//get file size from DB
fileSize = rsfile.getInt("file_size");
//get file name from DB
fileName = rsfile.getString("file_name");
final int BUFSIZE = 4096;
//get file content from DB
byte b[] = new byte[BUFSIZE];
b=rsfile.getBytes("file_content");
//response.setContentType(rsfile.getString("file_content_type"));
response.setContentType("application/octet-stream");
response.setContentLength((int) b.length);
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setHeader("Pragma","no-store");
response.setHeader("Content-Disposition:","attachment; filename=\"" +fileName+"\"");
response.getOutputStream().write(b);
response.getOutputStream().flush();
response.getOutputStream().close();

Hi bsampieri,
Thanks for ur reply. I got the issue resolved. The problem was because of caching headers in the page. I got the info from Microsoft Knowledge Base Article - 323308,815313. My issue is resolved. Thanks for your reply. Bye
Regards,
Mubarak

Similar Messages

  • How can I get "library components" for Encore? download from Adobe site is corrupted/missing files

    How can I get "library components" for Encore? download from Adobe site is corrupted/missing files.  I have tried 3 times to d/l and each time problems.  HELP please!
    I just want the DVD templates and buttons that would come with actual purchase of Encore.  Having creative cloud subscription should not limit this for me, right?
    BTW I have CC subscription, Windows 7,

    Thanks very much I have contacted them via this. Just hope they respond quickly- rather annoing! Greatly appreciated though

  • Jar files downloaded from SkyDrive are being renamed to jar.zip files

    I have cut and pasted the following series of exchanges from when I posted the problem onto SkyDrive's support forum. I hope that someone might be able to propose a better solution to the problem that I have. Thanks for your help.
    MDSms asked on
    Uploaded jar files convert to jar.zip files when downloaded from SkyDrive
    I have uploaded an executable jar file to SkyDrive. (I will call this FILE.jar). The file is intact and indicates that it is a jar file type when the file is viewed by Properties within Skydrive. However, when I download (or others download through a share link) the file, it is being saved onto the local computer's download file with .zip appended to the file name (FILE.jar.zip). The downloaded file can be renamed to remove the .zip appendage and subsequently run successfully. However the folder options for the folder where the downloaded file resides must be changed for disable "Hide known file extensions" prior to being able to remove the .zip appendage. While I have figured out the workaround for this problem, this manual renaming procedure is entirely too cumbersome as a solution for sharing this file with others. How can I prevent or disable the FILE.jar file from being renamed to FILE.jar.zip when it is downloaded from SkyDrive?
    All Replies (5)
    Audrey_P. replied on
    Forum Moderator
    Hi,
    Thank you for posting. Let me try to assist you with your issue with your files.
    In order for us to reproduce the issue on our end. Please provide us with the exact steps that you did when you uploaded the files as well as the steps when you are downloading it.
    We will be needing the steps to help us figure put what is causing you this issue.
    We look forward to your response.
    Thank you.
    Audrey P.
    MDSms replied on
    Reply
    The file was uploaded by first logging onto my SkyDrive account using Windows 7 Pro and Firefox browser, then a new folder in my account was created without sharing privileges, then the folder was opened and the FILE.jar was uploaded into the folder using the "Upload" option on skydrive account menu. Sharing privileges for FILE.jar were then created (view only), and the shortened url link was sent to the individuals that I was trying to share the file with. was then turned on. When these people use the link to download the file, it is being saved as FILE.jar.zip.
    When I try to download the file through the skydrive account download option, it is being saved onto my computer as FILE.jar.zip and this occurs when I try to download the file while signed into my skydrive account as well as when I am not signed into my skydrive account (using the shared file link).
    This PNG shows the information provided by clicking on the download icon (down arrow) within the Firefox browser; note that the file was downloaded as FILE.jar.zip and that the source was live.com. When I use Windows Explorer to look at the same file within the Download folder itself, examining the file's properties details also shows that it is being saved as FILE.jar.zip and is of the file type compressed zip folder.
    This PNG shows the information displayed to me from my skydrive account when I view the originally uploaded file's properties; note that the information shows that the file is a jar file type.
    When I utilize Internet Explorer 9 to access the file, FILE.jar is being downloaded onto my computer as a jar file type. This PNG shows the information provided by Tools/View Downloads within the IE9 browser. Note that in this instance, the information indicates that the file is being downloaded from yzudea.blu.livefilestore.com.
    It appears to me that the problem (the FILE.jar file being renamed to FILE.jar.zip) arises from the fact that a jar file downloaded from skydrive using firefox, is being sent from live.com whereas a jar file downloaded from skydrive using IE9 is being sent from yzudea.blu.livefilestore.com.
    I want to make sure that a person receiving a share link from me for FILE.jar is able to download it without modification to the file name regardless of which browser is being using to access the link. How can I make sure that this occurs?
    Any help is appreciated. Thanks.
    Michelle Anne D. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    I appreciate you for providing as much information as you can about the issue, as well as for uploading screenshots on what you see from the downloaded file. About your initial concern wherein the file gets renamed with .zip after the original file extension, this is solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented.
    Moreover, you may see the file servers live.com and yzudea.blu.livefilestore.com to be different with one another, but they actually are sent from the same SkyDrive server. This in turn, depends on the web browser where the file is being downloaded as well. The live.com file where it was downloaded from Firefox simply masks its original server yzudea.blu.livefilestore.com.
    As for your last query about your recipients downloading the file without the hassle of renaming it from a .zip file, you can simply tell them to download it through Internet Explorer.
    Should you have other queries or additional information that might help in our investigation, I highly encourage you to post them here.
    Regards,
    Michelle
    MDSms replied on
    Michelle,
    Thanks for your reply. Yes, I could simply tell them to download the file through Internet Explorer, but is there another solution or workaround to the problem I have described here? Am I being punished with the curse of this problem simply because I (or the individuals with which I wish to share FILE.jar with) choose to use Firefox instead of IE? Will the use of any other browser instead of IE (Chrome, Safari, etc., etc.) still result in the same problem?
    You stated that it is "solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented"........could the problem be overcome by designating one or both of the file server addresses as Trusted Sites within the browser options setting?
    I look forward to your response. Thanks in advance.
    Joy V. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    We understand your concern. Since the issue does not occur in Internet Explorer, it has something to do with Firefox's security feature. You might want to verify this concern by contacting Firefox support.
    Hope this helps. Let us know if we can further assist you with SkyDrive.
    Thanks,
    Melanie Joy

    Try to delete the mimeTypes.rdf file in the Firefox profile folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions

  • Just upgraded to Lion, can't open any pdf file downloaded from internet that was fine with Leopard. How can I overcome this obstacle ?

    Just upgraded to Lion, can't open any pdf file downloaded from the internet that was fine with Leopard before. I just got a black screen when I clicked on a pdf icon on a given internet site, and same happened with several sites that I visited. How can I overcome this obstacle ?

    Try two things with Safari not running:
    1) Launch Adobe Reader, open its preferences, select the Internet category, and check the values under "Display PDF in browser using".  If it's checked, try unchecking it.
    2) Look in /Library/Internet Plug-Ins (at the top-level of your boot volume) for something names AdobePDFViewer.plugin.  If you see such a file, try moving it to a folder named "Disabled Plug-Ins" (if such a folder exists) or onto the Desktop.
    Then see how things work.

  • This message appears whenever I try to open a file downloaded from internet: can't be opened because it was not downloaded from the Mac App Store

    Just bought a new Imac OX 10.9. Installed contents from previous Time Machine. All looks good. But, now, when I try to open any file downloaded from interent (like the Amazon mp3 downloader, for example or a plugin update) I get this message:
    "XXX can’t be opened because it was not downloaded from the Mac App Store" . Help! Thanks

    Got it solved! System preferences, security & privacy icon, general: allow apps downloaded from Mac Store and Identified developers! Phew!

  • Cannot download 1 secure site when others can

    I am unable to download one secure site
    I downloaded it on another computer using IE.
    Cannot download it on this computer using IE
    Get timed out message. Tried clearing cache and cookies in history.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    See also http://kb.mozillazine.org/Error_loading_websites (Error_loading_some_websites)

  • File download from one server does not work (other browsers work)

    After uprading to Win7 and FF 7.0.1 the file download from our intranet server stopped working. IE 9 and Chrome 14 does not have any problems. When I try to open for exmple this URL:
    https://wwwedu.oulu.fi/intra/?act=58&rnum=26241
    I got only an error page:
    Corrupted Content Error
    The page you are trying to view cannot be shown because an error in the data transmission was detected.
    The page you are trying to view cannot be shown because an error in the data transmission was detected.
    Please contact the web site owners to inform them of this problem.
    I have tested this with two separate computers and got some similar reports from students.
    If there is is problem in the headers etc. of the server, I would be very pleased to know that, too!
    Thank you very much
    Eetu Pikkarainen

    Thank you, the discussion in [https://bugzilla.mozilla.org/show_bug.cgi?id=681140 bug 681140] was informative.
    (By redbot.org I found out that there was two Content-Disposition headers. They were identical, but other one had one space character more. When they were corrected to identical then douwnload work. Now I still have to find out why there are two...)

  • Why i cannot download From any site short videos ntwith Iernet Download Manager in new Mozilla Firefox?

    '''
    Why i cannot download From any site short videos with Iernet Download Manager in new Mozilla Firefox?'''
    I want to install the new version,but the Last one it is
    Better.
    Thank you ...

    You need to update Firefox to 3.6.17 via Help | Check For Updates.
    Then install this add-on: https://addons.mozilla.org/en-US/firefox/addon/flash-video-downloader-youtube/
    Some security issues affecting your system.
    Go to Tools | Add-ons | Plugins and disable "Fun Web Products Plugin". This is spyware.
    Update the following plugins.<br><br>
    * Adobe Flash via http://get.adobe.com/flashplayer/<br><br>
    * Adobe Shockwave For Director via http://get.adobe.com/shockwave/<br><br>
    * Adobe Reader via http://get.adobe.com/reader/?promoid=BUIGO<br><br>
    * Java via http://www.java.com/en/<br><br>
    Here's the relevant Adobe security advisory: http://www.adobe.com/support/security/advisories/apsa11-02.html

  • APEX 4.0: error while opening a XLS file downloaded from interactive report

    Hi,
    I'm getting below error while opening a XLS file downloaded from an interactive report (APEX 4.0).
    "The file you trying to open, 'customer_2.xls', is in a different format than specified by the file extension.
    Verify that the is not corrupted and is from a trusted source before opening file. Do you want to open file."
    Yes No Help
    May be this one Apex 4.0 issue.
    please help me.
    Thanks
    Mukesh

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • File download from server

    Hi All,
    I have written a code that downloads a file from server using the following link given by Frank,
    File download from server
    I am able to get a open/save/cancel dialog with help of this. But issue is that applications of kind .doc/.xls/.ppt gets opened (If user clicks open) right in the internet explorer window instead of getting opened in a new office application....
    However .pdf runs fine.
    Can any thing be done for this???
    Any help....
    Regards,
    Amitt

    Hi,
    what do you have for the content disposition header?
    Try this:
             response.setHeader("Cache-Control", "max-age=0");
             response.setHeader("Content-Disposition", "attachment; filename=\"" + fname + "\"");
             response.setContentType("application/x-download");Brenden

  • Hi- I'm trying to install xcode 2.5. Idon't know what to do w/.exe file downloaded from the apple developer website

    Hi- I'm trying to install xcode 2.5. Idon't know what to do w/.exe file downloaded from the apple developer website.
    I would like to be able to use AU Lab but my developer folder only has extras/palettes inside- no applications or tools.
    Thanks

    Hello,
    What is the full name of this exe file?
    Those are for Windows®

  • Questions regarding jsp file download from blob

    Hi developers, i'm doing jsp file download from a blob column in DB2 using struts,
    1) How do i design the jsp page such that the page will show perhaps a hyperlink for me to download the file?
    2) What about struts-config.xml? Do i need to modify any mappings there?
    It would be great if some kind developers were to provide some sample codes for me. Thanks alot. Your effort is kindly appreciated.

    http://kr.forums.oracle.com/forums/thread.jspa?threadID=1982213 - looks similar, you may need to change contentType as per use case

  • Deleting email on outlook opens a file download from firefox

    deleting email on outlook opens a file download from firefox

    Windows 7 - Outlook has a file download box that will not go away.,please help
    go to this website and the solution is there...
    http://www.sevenforums.com/microsoft-office/176965-outlook-has-file-download-box-will-not-go-away-please-help.html

  • I cannot install a previously purchased version of acrobat 9 pro downloaded from the site.  Returns message at final install steps "invalid serial number." I had copied it and pasted it directly from "My Adobe".  What to do?

    I cannot install a previously purchased version of acrobat 9 pro downloaded from the site.  Returns message at final install steps "invalid serial number." I had copied it and pasted it directly from "My Adobe".  What to do?

    Hi hgratz,
    Considering 'invalid serial number' error for Acrobat 9, I would suggest you to please refer the KB doc link mentioned below:
    Error "Invalid serial number" | Acrobat 9 | CS4
    Let me know if that helps.
    Regards,
    Anubha

  • Flash Download from Adobe site says it's not most current and will not continue the install.

    I tried to update my flash on 9/20 and my flash seems to have gotten corrupted. Since that update, its not working properly and some sites report it's out of date or doesn't seem to be installed.  Tried downloading Flash from your download area today but when the installer runs, it states The version is not the most current.  Please download from the player download area.  However, I did get my install directly from your website's downloads area.  I uninstalled my &quot;corrupted&quot; version thinking it might be causing the issue but I still get the same error with the flash download from your site and now I have no Flash at all.
    Please help.

    Download and save the uninstaller Save it to your downloads folder -  DO NOT run it yet.
    Download the Adobe Flash Player installer directly by right clicking one (or both) of the following links and selecting "Save Target as"(IE) or "Save Link as"(other browsers).
    Flash Player for ActiveX (Internet Explorer)
    Flash Player Plug-in (All other browsers)
    Save the installer(s) to your downloads folder - DO NOT run it(them) yet.
    Reboot your system.
    BEFORE you run anything else, locate and run the uninstaller.
    When it finishes, run the  installer(s) to put Flash Player on your system again.
    If you use IE see also:Enabling Flash Player in Internet Explorer  and: ActiveX Filtering in Internet Explorer

Maybe you are looking for

  • New imac 24 inch unresponsive after leopard upgrade

    I have installed leopard on all of my family's computers. My new 24 inch imac has become unresponsive after being on for about 24 to 36 hours. The only way to regain control is to hold in the power button for a few seconds and restart. The other comp

  • Can't burn photos to DVD+RW on my hp Pavilion 6000 ( drive is hp DVD A DH16A BLH )

    I cant burn photos to a DVD+RW. I'm using Verbatim DVD+RW discs. When I try to burn the photos I get the message "please insert a writable/recordable  disc ". I can burn the pics onto a CD but I want to make DVD's too ! Please help ! I'm not that tec

  • Change Currency in Park Document

    Hi, I have parked one document with currency USD, now I want to change same document from USD to SAR in FBV2. How can I change currency field, please advise! Regards VS Rao

  • Control Inspection Lot Generation

    Hi Experts, I have a requirement where I need to use Inspection Type 04 in 2 ways. 1) For FERT material types inspection lot should be generated automatically. 2) For HALB material types inspection lot should not be generated. The client will generat

  • Display letter total in folders?

    I would like to know how many letters are in each of my sub-folders. How do you get those red numbers to display? Thanks iMac 17 1.83 GHz Intel Core Duo (Early 2006)   Mac OS X (10.4.8)   LaCie d2 250GB