Open or Save option to download images in JSP

Hi,
I am working on a image bank application that uploads, searches for images saved in a File Server.
When the user searches for the images I retrieve the images and I need to give them an option to download the image on click (the same like the browser asking for Open or Save).
Any help is appreciated.

I did the same work but I used a Servlet and not a JSP. This is because JSPs format output to be an HTML text and not a binary stream. Instead servlets can used to output any type of stream you want.
Note that some browsers ignore content type header statement, i'm not surprising if IE will open the file with microsoft excel because it detects the extension of the filename you give it in the Content-Disposition.

Similar Messages

  • Do you want to open or save option disabling

    Hi friends
    i have pdf which is placed it in mime and i used file download UI element for opening it .
    Now my requirement is when i click on the link it opens pdf asking Do you want to open or save file ,but i should not allow this dialog window for the end users So can any body please let me know how to disable this dialog window
    Thanks in advance

    I checked that also but i could not find any changes it is having the properties of auto,allow in place and save

  • How do you open and save PNG files as images rather than a document (which my MacBook is doing automatically)?

    Hi,
    Basically I'm doing a course in which i need to import images on a document for evidence (in particular Cirque Du Soleil, yes it's a weird course!) I am using the develop menu tab and using the Inspect Element menu. Here i have found loads of images that are perfect for my evidence, but the images are all showing as PNG files. Whenever I try to save these they will only save as Documents and not images. How can I change this so I can save them as images and import them imto Pages.
    Many Thanks
    Mason

    Hi @Shootist007
    I knew PNG files were image files, that why i was confused when I saved them onto my Mac they were showing as Documents under file type. But i managed to do via Preview (opened it up in Preview then click and dragged to my document).
    Thanks for your help

  • How to save and retrieve an image in JSP/Java and MS SQL/server 2000?

    Hi All,
    I am uploading an image from the JSP page and want to store it in MS SQL server. I have made a column by the name "COMPANY_LOGO" with data type as image MS SQL/server 2000. How do I save the full image in the table and how do I display the thumb nail image on the JSP page???
    Regards,
    Raj

    BEFORE YOU POST A TOPIC HERE: Please be sure your topic is related to features or functionality of this site. This forum is not for general technology questions. Not sure which forum to use? Try searching for your topic in the "Search Forums" element on the left panel.
    Post your question in
    http://forum.java.sun.com/forum.jspa?forumID=45
    or
    http://forum.java.sun.com/forum.jspa?forumID=48
    Do not reply here

  • Can't "open" an attachment from godaddy webmail in firefox, only allows download/save option. works fine IE so it is a browser issue not a GoDaddy issue

    There are two options on the godaddy webmail when you receive an attachment, open in one link and download in a second link. both links are attempting to download and save, i have contacted godaddy with no success or explanation, they had try to use IE and webmail functioned properly allowing to simply open and view and attachment without having to save it?

    Finally figured it out...go to Tools, Options, Applications...and change pdf reader from Adobe to Foxit and it will resume providing option of either opening or saving pdf files.

  • For downloads in windows 7, how can I add the option to "save as" instead of just "open" or "save"

    Hi, could really use your help! Recently updated Firefox. I used to click on downloads and be able to "save as". Now, I can only "open" or "save". When I click on "save", all the files go to one default downloads folder. Then I have to open explorer, locate the folder and file, then cut and paste it to the appropriate folder. A cumbersome process!
    Does anyone have a solution? Thanks!

    It works - thanks so much! Note if others have this issue, you may think it's not working - you'll still get the same pop-up box with only two options - "open" or "save". However, when you click "save", it then gives you the option where you'd like to save it to.

  • TS1702 I downloaded ibooks to my ipad so I have a place to save PDF files.  I do not get the "open in ibooks" option.  Only get "mail" and "print" option.

    I downloaded ibooks to my ipad so that I can save PDF files to ibooks but I do not get an "open in ibooks" message to select.  When I choose the icon, I only get mail or print option.

    Where are these PDFs coming from?  What do you mean by "save PDF files to ibooks" and then "I do not get an 'open ibooks' message?  If they are saved to ibooks (I assume you used itunes to save a dragged in PDF to the ibooks panel in apps) then you should be able to open and view them in ibooks.  If they are not in ibooks (I'm assuming this is the case, since you want to get an "open in ibooks" option from the *share* icon, right?) then where are they on the mini, which app?

  • How can I have the option to either open or save each download?

    I would like to be given the option to either Save OR Open a file/document each time I download something. At my laptop it's either/or. I can either set the properties to always save to a particular spot, or not. How can I get both options on downloading?

    Options > General > Downloads > select "Always ask me where to save files". See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20General%20panel Options window - General panel]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Whenever I try to download a PDF to save for future use, it keeps opening up the text in my email and won't give me the option to download and save.  Any suggestions?

    whenever I try to save a PDF document on mu iPad, it will only open up as text in my email and won't give me an option to download and save.  Any suggestions?

    You can hold down on the open PDF and get the option to Open In -  in the resulting pop up window.

  • Download files / open-save option

    I have a button opening a file, but I want it to give the
    option of open or save as opposed to going directly to the URL of
    the file and opening in a browser. thanks
    on (release) {
    getURL("
    http://www.website.com/formone.pdf","_blank");
    }

    Yeah, the download method is from the File Reference class.
    So you need to import the class;
    import flash.net.FileReference;
    …and then create an instance of it;
    var fileRef:FileReference = new FileReference();
    Now with that instance (fileRef) use dot syntax to access its
    download method;
    fileRef.download(“
    http://www.website.com/formone.pdf”,
    "FlashPlatform.pdf")
    The second argument is optional of this method. So you can
    essentially have the following code on the MAIN timeline. You
    should use the button event handler instead of your on(). All you
    have to do is put your button’s instance name in place of
    “myButtonInstanceName” (from the code below) and place
    this on the main timeline where it resides.

  • I checked the always save box for downloads and now don't have the option of "open"

    I tried looking at the the firefox application thing and it said "always ask" next to things, but it isn't asking. Not sure how to get my open or save box back!

    You can rename (or 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
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Director: Show Folder (Linux: Open Director; Mac: Show in Finder)

  • Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoyi

    Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoying. What happened? Internet Explorer 8.0 did the same thing. This was one of the reasons why I started using Firefox to download all images. I went into Tools>Options and it only lets me set another folder. I dont want to set a specific folder I want it to always go to the last folder used. So what gives?
    == This happened ==
    Every time Firefox opened
    == possibly when the most recent updates were installed, a few days ago

    Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
    So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.

  • Popup with open and save file option

    Hi,
    I have created a button on my page name as "Export File" and created a process and called on "EXPORT FILE" button. I am using utl file in this procedure and i want to download this file and file will be .ics file using for calendar.
    My page process code is
    begin
    pro_create_ical(:P6_START_DATE,:P6_END_DATE);
    end;when i click on export file button it should raise a popup with open and save file option.
    How i can do this?
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 25, 2013 1:59 AM
    Edited by: Vedant on Jan 25, 2013 2:00 AM
    Edited by: Vedant on Jan 25, 2013 3:49 AM

    Shiv,
    Have you installed any new Software/Spyware/Virus Scanner etc.Check it out.It might have caused the issue for last 5 days.
    This issue is fixed in Latest Support Package Versions.
    Which Version of Support Package you are using?
    If EP6 <SP19 you will face this issue.
    Just upgrade it to EP6, Support Pack-19,this will be resolved.
    Upgrade of Support Pack wont take much time.you can get the document under http://service.sap.com/instguides
    Hope it helps
    Regards,
    Karthick Eswaran
    *Reward Points for helpful answers.

  • How do I re-enable open or save setting when I click on the download file?

    My initial Firefox download setting was this: When I click on the link I would like to download, it asks me whether I want to '''open the file or save''' the file. Underneath, there was a check box to click on, in case you do not want the dialogue box to come up again. I clicked on the check box once, because I had to do a repeated download of a number of pictures. I would like to get back on 'asking open or save' dialogue box. I cannot find how to re-enable this function. Please help!

    By the way, a few other things you probably know:
    (1) The setting to keep the downloads list displayed after a download is here:
    orange Firefox button ''or'' classic Tools menu > Options > General
    Check "Show the Downloads window..." and ''uncheck'' "Close it..."
    (2) You can always show the list by pressing Ctrl+j
    The mimeTypes.rdf file isn't particularly relevant to this problem; it affects what application Firefox uses to open a particular type of file.
    However, there is a database file which stores your download history which might be corrupted. You could rename that file and have Firefox start building a new one.
    (1) Open your personal settings (AKA Firefox profile) folder
    Help (or Alt+h) > Troubleshooting Information > "Show Folder" button
    (2) Switch back to Firefox and exit the program (e.g., File > Exit)
    (3) Wait a few moments for Firefox to finish updating files in your settings folder, then rename '''downloads.sqlite''' to something else, like downloads.old. Alternately, you can delete the file.
    (4) You're done with your profile folder and you can restart Firefox now.
    Any improvement?

  • Downloadable .tiff files open in quicktime, not as an image file: using mac

    I am using a Mac 10.6.3 and
    Ffirefox ver: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
    downloadable .tiff files open in firefox quicktime, not as image files, nor do they let me choose how to download or where to save or as what type of file.

    Hello andrea,
    You can tell Firefox to ask you where to store your download files by changing the Firefox "Preferences". You can get the instructions on how to do it in this article: [[Downloads window]].
    I would advise you to download tiff files as tiff files only otherwise they may become unviewable.
    Now, to open your tiff files as images, you can change the settings on your Mac computer as follows:
    #Select the tiff image that you downloaded.
    #Right click on it and select "Get info"
    #A windows will pop up. In this window, select the "Open with" item. Under this item, select "Preview" or any other image viewer application that you want to use.
    #Next, click on the "Change All.." button. Click "Continue" in the message that is shown.
    That's all. Now, your tiff files will open as images in the application that you just selected
    Hope this solves your problem !

Maybe you are looking for