How to detect if a file download was OK

Hi all,
I would like to know if exists any way to detect if a file sent out by a servlet to a browser was succesfully saved on the client.
At least I would be happy to know if the user pressed the "OK" button or the "CANCEL" button
I am sending the file in this standard way:
res.setContentType("application/octet-stream");
res.setHeader("Cache-Control", "public");
filename="testfile.txt";
res.setHeader("Content-disposition","attachment;filename=" + filename);
out = res.getOutputStream();
int len;
while ((len = is.read(buffer)) != -1) {
out.write(buffer, 0, len);
} // end of while
is.close();
out.close();
where res is the javax.servlet.http.HttpServletResponse
buffer is a byte buffer and is a java.io.InputStream
The point is that when this code is executed it reaches the end BEFORE
the user presses any button on the save file dialog box. Perhaps is way the files are little files....
thanks in advance,
Andrea

I don't think so. I mean, you can be sure you sent to the client, but not that the client received it OK

Similar Messages

  • In flash pro cc, how do i get the files i was working on previous session to open automatically?

    in flash pro cc, how do i get the files i was working on previous session to open automatically?

    cs4 had it 'on launch' --> last documents open, under general preferences. i don't see it in cc version, so i guess you're right. hard to understand, since it saved time.

  • How to print a PDF file that was display in my page...

    Hi !. My doubt would be the following one... I would like to know how to print a pdf file that was displayed in my page ?... I mean the PDF file not the page...
    The PDF would be in this url:
    http://iprodesa.lasegunda.com.ar:8090/datos/pdf/830.pdf
    How could I implement this ?...

    This first question which comes to mind is how do you display the pdf file in the browser?
    For this the browser uses a plug in (e.g. adobe reader) which already has the ability to print the pdf file. Depending on the version of your plug in, printing is started differently.
    Timo
    Ps: which jdev version do you use?

  • How do I recover a file what was written in the 'notes' app that I have accidentally deleted?

    how do I recover a file what was written in the 'notes' app that I have accidentally deleted?

    If you have an iTunes backup or iCloud backup containing that note you can restore from that backup.
    If you have no backups the note is gone.

  • How to import a flv-file (downloaded form YouTube) into iMovie?

    How to import a flv-file (downloaded form YouTube) into iMovie?
    It needs to be converted to which format?
    Suggestions how to do that?
    Thanks.
    Mattie
    The Netherlands

    http://perian.org (free).
    QuickTime Player Pro ($30).

  • How can I change the file download time using Adobe Send? Adobe SendNow had a lot more options.

    How can I change the file download time using Adobe Send? Adobe SendNow had a lot more options.I don't see nay with Adobe Send.

    There isn't a feature in Adobe Send for setting and end-date for a file's availability. At any time, you can Unshare the file, however.

  • How can I import mpeg files downloaded into itunes?

    How can I import mpeg song files downloaded into itunes?

    Where are your MPEG stored?
    I have hundreds of old MPEGs stored in my nexternal drive, but unfortunatly i was not able import them into iMovie. I did the following trick: I created a new set of a folder and subfolder and called it "Virtual_CAM/DCIM" and saved it on my desktop. Then went to Disk Utilities>File Menue>New>Disk Image from Folder. Then selected the folder on my desktop and clicked enter. I moved the .dmg file to my external (or just keep it on your desktop). I clicked on the .dmg file. It shoud be visible on the Finder. Open your Imovie and import as you do from your camera.

  • How to make a jar file downloadable with IE

    hello,
    I just bought a website:
    http://www.frozenfountain.net/
    and I put a jar file on it called Logo.jar
    Using Mozilla, the jar file downloads as expected, but with Internet Explorer, it tries to download it as .zip file.
    How do I get it to download as a .jar file with IE?
    thanks

    Just post a link to the Jar. Mozilla will download
    it as a jar. Windows will download it as a zip.
    Only one link. No problem, really. ;-)There is a problem. People who arent as good with computers as you are won't know how to run the jar file after downloading with IE.
    At school, I told someone to download the file, which they did with IE. It downloaded to desktop as a zip. They extracted and were left with a bunch of .class files.
    On a sidenote, how do you draw text with a gradient?

  • How to create the SWF file which was included surrogate pairs.

    I would like to make sure how to create the SWF file which are included surrogate pairs.
    The error of outside the scope of unicode occurred when I compiled(mxmlc) the as file which was set surrogate pairs to 'Unicoderange'.
    Ex, I set the '  '(UTF-16 is '20B9F') to 'Unicoderange'.
    However, I cannot add the surrogate pairs.
    The error of outside the scope of Unicode occurred when I compiled the AS file.
    The reason of error was that the Unicode(UTF-16) of surrogate pairs is invalid.
    Then, I read the following pages.
    These pages are written that unicode-range supported surrogate pairs.
    http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_07.html
    http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#descdef-unicode -range
    So please let me know how to create the SWF file which are included surrogate pairs.
    Environment
    - Flex3.5a
    - TTC: meiryo(ver6.02), msgothic(ver2.50), mspgothic(ver2.50)
    Thanks,
    Takeshi Ishihara.

    I've been able to create project jar files in Eclipse by selecting Export from the File menu, then choose Java - Jar file - and provide the required information, name, destination folder etc. But when I do this, I do not export other jars on the build path this way nor do I expect to do this. I am only concerned with creating a jar file of my own work. A jar file does not "contain" other jar files. If the jar file contains the main method, and requires other jars for it's execution, then you may wish to include a reference to required jars on the class path entry of the Manifest file of the jar file you create. I'm not sure how to create a Manifest file in eclipse though..

  • How do I force a file download from a folder above the root?

    I am new to ColdFusion and need some help. I set up a virtual folder on my website and then mapped in the CF9 admin panel to a "Docs" folder above my root, where I would like to store sensitive documents. CF tags are enabled.
    I know that my mapping is set up correctly, because when I set up a cfm page with the following code, I can successfully download the file:
    <cfheader name="Content-Disposition" value="attachment; filename=Calendar.pdf">
    <cfcontent type="application/pdf file=/Docs/Calendar.pdf">
    But what I need is to create one cfm age that will be able to handle downloads of multiple files types and names from the folder above my root.
    I then found Duke Snyder's solution on an older forum for the "click link and download file" question where he suggests making a "download.cfm" page with the following code:  I did this, and named the file "download.cfm"
    <cfsetting enablecfoutputonly="yes">
    <cfheader name="Content-disposition" value="attachment; filename=""#Url.FileName#""">
    <cfcontent type = "foo/bar" file = "/Docs/#Url.FileName#">
    Then Duke suggests: "Now I pass the FileName through the Url and it WILL ask if you want to open or download the file. We accomplish this by making up an eronious file type."
    I then set up a password-protected page on the site that lists the titles of a number of documents, with links to the virtual folder, where they can be downloaded.  One of the links, which goes to "Calendar.pdf" I constructed as: "download.cfm?FileName=Calendar.pdf"  When I click on the link, I get the popup box that says "Do you want to open or save this file?  With the name listed as: "download.cfm?Filename=Calendar_pdf"
    When I click "Save", I get the message: "Internet Explorer cannot download download.cfm from www.... Internet Explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found. Please try again later.
    I must have constructed the link incorrectly. Any ideas?  Thanks in advance for your help.

    I am trying to force the download of pdf files from a folder above the root.  The file below is named "download.cfm"  I pass the name of the file (Calendar.pdf) in the URL link, as follows: download.cfm?filename=Calender.pdf
    In the ColdFusion admin panel, I mapped a folder in the root "Docs"  to point to a folder with a different name above the root.   I have tried the code below, which was generously supplied by another member of this forum, but it does not seem to recognize the CF mapping. Do I need to use another CF Tag for the mapping to working correctly?
    <cfsetting enablecfoutputonly="yes">
    <cfheader name="Content-disposition" value="attachment; filename=""#Url.FileName#""">
    <cfcontent type = "application/pdf" file = "/Docs/#Url.FileName#">
    Thanks for your help

  • How to invoke a xml-file download ?

    How can I manipulate XSQL/XSL that when the transition is done, the user downloads the result to his file system. And not only for XML File downloads but for txt or doc formats?
    Thomas

    In transaction SM69 external operating system commands can be set up and then these can be executed using function SXPG_CALL_SYSTEM from ABAP or using SM49 transaction.
    See documentation in the function module and application help in the SM69 / SM49 transactions.
    You could set up commands for copy, move, delete for the relevant directories.  Be careful to limit the directories and set security appropriately.
    Andrew

  • How do I Convert Music Files to .Was or AIFF?

    I want to burn a CD that will play on an regular CD player. How can I convert the file format of songs in my iTunes to a format that will work on such a CD player?

    This is how you create audio CDs. If it's not working then there can be a few reasons why it's not.
    burned the disk choosing "Audio CD" and the resulting CD would not play in a "regular" CD player.
    Does this "regular CD player" play CD-R? Have you played other burned CDs in it?
    Have you tried this burned CD in a different CD player? Pop it in a DVD player and see if it works.
    Does this CD play in iTunes?
    Are there any other suggestions?
    Try to burn at a slower speed.
    Try different discs.

  • How to make a PDF file downloadable on my website?

    Hi,
    I'm trying to create a PDF that can be downloaded from
    people that are on my website.
    I tried to point a link to the PDF file that's on my sever
    but all it does open the PDF file in a new window.
    How can i make it so that people can download that PDF file
    when they click on the link.
    the url to that website is
    Link">http://www.hostlyon.com/pizza-demo/[L=Link
    to website
    There will be a link on the navigation bar that says
    "download menu" . Thanks!!!

    .oO(watzursn)
    > I'm trying to create a PDF that can be downloaded from
    people that are on my
    >website.
    >
    > I tried to point a link to the PDF file that's on my
    sever but all it does
    >open the PDF file in a new window.
    >
    > How can i make it so that people can download that PDF
    file when they click on
    >the link.
    <a href="thepdf.pdf">Document Title (PDF, size in
    KB)</a>
    Micha

  • How to serve runtime generated file on WAS?

    Hi,
    In short: where (local path on application server) should I store a file (generated at runtime) in order to be able to offer it for downloading (via WAS)?
    Context: I have a BSP application and I want to generate a PDF file (in the BSP app) and store that PDF locally on the server. In which local folder do I need to store that pdf so that it will be available remotely via WAS? Is there some folder in the local system that serves as WAS root folder?
    Thanks!
    Jeroen

    Hi,
    I wouldn't open the file system of the WAS for the public and let the WAS read the file itself and serve it to the client.
    Eg
    Open the file
            OPEN DATASET file_path_pdf FOR input IN Binary mode message openmessage."text MODE encoding utf-8 .
            if sy-subrc <> 0.
            %>
                <%=openmessage%>
                <% mnavigation->response_complete( ).%>
            <%
            else.
                read dataset file_path_pdf inTO pdfcontent.
                CLOSE DATASET file_path_pdf.
            endif.
    Give it to the browser
            runtime->server->response->set_data( pdfcontent ).
            contentsize = xstrlen( pdfcontent ).
            runtime->server->response->set_header_field( name = 'Content-Length'
                                                 value = contentsize ).
            runtime->server->response->delete_header_field( name = 'Cache-Control' ).
            runtime->server->response->delete_header_field( name = 'Expires' ).
            runtime->server->response->delete_header_field( name = 'Pragma' ).
            runtime->server->response->set_header_field( name = 'Content-Type'
                                                     value = 'application/pdf' ).
    Eventual delet of the file
            delete dataset file_path_pdf.
    Set the reponse to complete to clear the buffers
            mnavigation->response_complete( ).
    Als take care when converting to PDF that you use unique file names in case you want to keep the files.
    Eddy

  • How to do popup for file download???

    Hi,
    I'm trying to create a popup for file selection for download. Basically, I want to call:
        call method cl_gui_frontend_services=>file_open_dialog
    This works fine from a report, but from my web dynpro I get a dump because apparently there is no gui (parameters www_active and activeX are all empty).
    Does anybody have any experience with this? I'm thinking:
    - am I doing something wrong?
    - does this method work with web dynpro at all?
    - is there some other CL_WD* class for this purpose?
    - are my system settings screwed up?
    Thanks for all hints!
    Ira

    This might be helpful:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/42af9f90-0201-0010-6099-ba67e5426bdf
    - April King

Maybe you are looking for

  • Urgent help please

    Hi, i'm having a problem that i just cant work out; i'll describe whats happening and would greatly apriciate any help anyone can give. when i type in an external/absolute link in dreamweaver sidewide change link function i keep getting a message say

  • Attempt to get media from DV Camcorder crashes every time.

    Dell E6500 Laptop Intel Core Duo CPU   P8600 @ 2.40GHZ  2.40GHz 4GB of RAM (3.45 GB usable) Windows 7 Professsional SP1 32bit Travelstar 7K500 7200rpm SATA II Main Drive The following error occurs every single time I try to load a movie off of my DV

  • Creative cloud renewed - status active but AAM & tools says expired!

    Yesterday I renewed the creative cloud subscription. Status in the web is active but the AAM says expired. Support is not directly reachable. (although subscription; great support!) Can someone help?

  • How to restrict values displayed using a select-options

    Can someone please tell me how to restrict values displayed using a select-options. Example- in my table I have 100 entries. However when the user will click on the required field- I want to be display only 25 options based on a given value of anothe

  • Creating an anchor option on the same page

    I'm creating a Auto Detailing website for my business and it's full of packages and options. I would like to create an anchor to link of the same page, that way I don't have my potential clients scrolling through the long webpage. I'm very new to web