How to get the end of a download action ?

Hello !
My web application must download zip file.
Actually, the servlet's code for download is like this :
response.setContentType("application/download");
response.setHeader("Content-Disposition","inline; filename=DownloadFile");
ServletOutputStream l_ServletOutputStream = response.getOutputStream();
l_ServletOutputStream.write(l_ByteArrayOutputStream.toByteArray());
l_ServletOutputStream.flush();
The client can see a popup dialog box asking him to save the file on disk or open it or cancel. In case of save action, file is downloaded but I don't know when this action finished. Is there any event to catch or something else that inform about the end of downloading action ( I have to refresh the display with a new JSP ) ?
Thanks for your help !

Propably to correct way would be to use HTTP-headers to indicate the length of the file, so actual application download is possible also through other clients, rather than the specific one, so you could do:
response.setHeader("Content-length",l_ByteArrayOutputStream.toByteArray().length);I'm not really sure if servlets do this automatically, they really should though, but I'm hazy on their implementation and you might want to check the HTTP specification on whether or not the length of the headers should be included in the Content-length field, as it might be required to.
Tuomas Rinta

Similar Messages

  • How to get the end time of an Interface?

    How to get the end time of an Interface?

    Hi,
    As per your reuirement. I will suggest to use IKM SQL to SQL append. and Before Insert statement in IKM u need to add one more step i.e update. Your update should be like this
    command on sourse.
    <%for (int i=0; i < odiRef.getDataSetCount(); i++){%>
    <%=odiRef.getDataSet(i, "Operator")%>
    select      <%=odiRef.getPop("DISTINCT_ROWS")%>
         <%=odiRef.getColList(i,"", "[EXPRESSION]\t[ALIAS_SEP] [CX_COL_NAME]", ",\n\t", "", "((INS and !TRG) and REW)")%>
    from     <%=odiRef.getFrom(i)%>
    where     <% if (odiRef.getDataSet(i, "HAS_JRN").equals("1")) { %>
         JRN_FLAG <> 'D'
         <%} else {%>
         (1=1)     
         <% } %>
    <%=odiRef.getJoin(i)%>
    <%=odiRef.getFilter(i)%>
    <%=odiRef.getJrnFilter(i)%>
    <%=odiRef.getGrpBy(i)%>
    <%=odiRef.getHaving(i)%>
    <%}%>
    Command on target..
    UPDATE <%=odiRef.getTable("L", "TARG_NAME", "A")%> T
    set <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD2)")%> ='N',
    <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD1)")%> =SYSDATE
    where (<%=odiRef.getColList("","T.[COL_NAME]", ", ", "", "UK")%>)
    in(<%=snpRef.getColList("", ":[CX_COL_NAME]", ", ", "", "UK")%>) and <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD2)")%> <> 'N'
    check UD1 and UD2 columns.
    Hope this will help you.
    Regards
    Saurabh

  • I have an iPOD mini library and now have a IPhone 4S.  I updated my library and synced my phone to the library but can not figure out how to get the music library to download to my  iphone

    I have an iPod mini library which I have update. I now have an iPhone 4S which I have synced to the library using a MS XP computer. I can not figure out how to get the library to download to my iPhone?

    Thanks,  This caused me to go back and try again since the solution seemed so simple.  What I did was when it started downloading, it started with the iphones apps to my computer.  I did not want the apps downloaded on my computer so I stopped it.  If I would have waited, the music was uploaded right after the apps were downloaded.

  • How to get the view Object in UserDefined Action

    Hi  All,
       Any body tell me how to get the view object , like the view object avilable in the wdDoModifyView() method as parameter.
    I have requirement like, i want to change the , no of rows displaying in the table should be changed at the runtime based onthe no of rows  selected in the dropdown box.
    The action which i created will be assigned to that dropdown box, on select of the available option, i will get the view object and change the properties of the "maxrows" of the table .
    so for getting the view object in the  the Action methods tell me what is the procedure for getting the current view object.

    Hello Vishal,
    Simply create a value attribute (say rowCount) of type 'integer' and bind it to the 'visibleRowCount' property of your table. Then, in the actionHandler get the value from the UI element (in your case, I guess it is drop down) and set it to the attribute 'rowCount' like this.
    wdContext.currentContextElement.setRowCount(
        wdContext.current<nodeElement>.set<AttributeBound toDropDown>);
    Bala

  • How to get the file name from downloads folder with the applescript??

    Hi All..
    I am downloading an application to downloads folder, I need to install the same application after downloading programatically.
    So how do I get the filename in runtime while downloading or after downloading from downloads folder with Applescript or Java?
    Also my download URL link doesnot contain full name of the download file.
    Pls suggest.

    Hi,
    The best method is to use curl.
    Other methods are not reliable, but can work, it depends on several factors (what the script does, what the user does).
    Here is an example with the curl command:
    set tUrl to "http://sourceforge.net/projects/vlc/files/2.0.4/macosx/vlc-2.0.4.dmg/download?ac cel_key=60%3A1350656196%3Ahttp%253A//www.videolan.org/vlc/download-macosx.html%3 A7233e4e9%245818d66f39b0576e1e9c4a0f3b46b1991180bfdd&click_id=976a88ee-19f7-11e2 -9a21-0200ac1d1d8e&source=accel"
    set dFolder to path to downloads folder
    tell application "Finder" to set newFolder to (make new folder at dFolder) as string
    set f to quoted form of POSIX path of newFolder
    do shell script "cd " & f & " && curl -L " & tUrl & " -o 'vlc.dmg'" -- download  to file "vlc.dmg"
    set downloadedFile to newFolder & "vlc.dmg" --<-- HFS path
    --do something with the downloadedFile

  • How to get the End date of the dynamic period in Financial Reports

    Dear All,
    I have a issue with the Financial Report, I want to show the text under the Heading in the Balance Sheet like 31 DEC 2008 but in this date should be the end date of the dynamic period what user select in the POV.
    Can any one have any idea about this.
    Regards
    rao.

    There are 2 options:
    1. Use the POVAlias text function:
    e.g. <<POVAlias ("Grid1", DimName)>>
    (you could also use POVMember if the items you want is the member and not the alias).
    2. Have a hidden column on the report referencing the POV selection, then reference this in the header.

  • How to get the User input of Dynamic Action confirmation message ?

    Hi Guys,
    I'm using apex 4.1,
    I have added a confirmation message box as page Dynamic Action. How can i get the user input of that confirmation pop up ?
    Thanks

    Hi,
    you don't directly get the user input. But you should still be able to get what you want. Let's assume you have a dynamic action which fires for a "Change" (or any other) event and which has two or more actions
    1) Confirm
    2) Execute PL/SQL Code
    If the user clicks Cancel/No in the confirm dialog, APEX will stop the execution of this dynamic action and not run "Execute PL/SQL Code".
    Hope that helps
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • How to get the real time controller download file for cRIO 9074

    Hello
    I am a beginner of LabView. Now I do a project in school with cRIO 9074.  
    My problem is that I have deleted the embedded controller system by fault. But in the Measurement and Automation software I didn't find the controller sysyem which have the fonction of monitor on line. How can I download the load file?
    Wait for your help, and  thank you for your help very much.
    Solved!
    Go to Solution.

    Even if you format the cRIO system it should be found by the MAX and by opening the Software config you can reinstall the system files assuming that they are installed on the connecting system (PC).
    So you have to use the MAX to setup the cRIO. Maybe it is of help to set the DIP switches to NoApp and IPReset first.
    Hope it helps
    Christian

  • How to get the header to downloading fine

    Hi,
    i am downloading xl file for which i need to get the header.i doesnt no the fieldnames.how to get the header for entire file.

    Hi,
    For this please create an internal table for field names and pass it to FM' WS_DOWNLOAD'.
    Sample code:
    * internal table for headers
    DATA : BEGIN OF it_fieldnames OCCURS 0,
           name(100),
           END OF it_fieldnames.
    g_fname = 'C:\Documents and Settings\kut3kor\Desktop\kar4.xls'.
    *populate the internal table
    it_fieldnames-name = 'Material Number'.
    APPEND it_fieldnames.
    it_fieldnames-name = 'Material type'.
    APPEND it_fieldnames.
    it_fieldnames-name = 'Material group'.
    APPEND it_fieldnames.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    *   BIN_FILESIZE                  = ' '
    *   CODEPAGE                      = ' '
       FILENAME                      = g_fname
       FILETYPE                      = 'DAT'
    *   MODE                          = ' '
    *   WK1_N_FORMAT                  = ' '
    *   WK1_N_SIZE                    = ' '
    *   WK1_T_FORMAT                  = ' '
    *   WK1_T_SIZE                    = ' '
    *   COL_SELECT                    = ' '
    *   COL_SELECTMASK                = ' '
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        data_tab                      = gt_mara[]
       FIELDNAMES                    = it_fieldnames[]
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_WRITE_ERROR              = 2
    *   INVALID_FILESIZE              = 3
    *   INVALID_TYPE                  = 4
    *   NO_BATCH                      = 5
    *   UNKNOWN_ERROR                 = 6
    *   INVALID_TABLE_WIDTH           = 7
    *   GUI_REFUSE_FILETRANSFER       = 8
    *   CUSTOMER_ERROR                = 9
    *   OTHERS                        = 10
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Karuna.

  • We need to buy Adobe Framemaker version 11. The distributor is only able to provide us with version 12. Can someone suggest me how is it possible to get the license for ver 11 serial  key after purchasing ver 12 and also how to get the download details ?

    We need to buy Adobe Framemaker version 11. The distributor is only able to provide us with version 12. Can someone suggest me how is it possible to get the license for ver 11 serial  key after purchasing ver 12 and also how to get the download details ?   Urgent response will be helpful.D

    Adobe Support helped us with a similar query. We ended up with exactly what you need.

  • I downloaded and bought a movie from iTunes on my iPad and now want the same movie on my MacBook Pro but its not offering me to download it, it giving me the options of buying it which I already did. How I get the movie onto my MacBook?

    I downloaded and bought a movie from iTunes on my iPad and now want the same movie on my MacBook Pro but its not offering me to download it, it giving me the options of buying it which I already did. How I get the movie onto my MacBook?

    You can connect the iPad to your Mac's iTunes and do File > Devices > Transfer Purchases, that should copy it over to the Movies part of your library.
    Depending upon what country that you are in, and whether the film studio allows it, you might also be able to re-download it on your Mac via the Purchased link under Quicklinks on the right-hand side of the iTunes store home page.

  • How to get the focus at the end of text ?

    I am having applet with awt TextField component and some default text. (MSQ-)
    To have a focus to text field I am using :
    refnoTextField.requestFocus();
    But this gives focus at the biginning and not at the end of text. I want the focus at the end (i.e. after MSQ-)
    How to get the focus at the end of text ?
    any help ?
    manisha
    manisha

    public void focusGained(FocusEvent e) {
         if (e.getSource() == yourtextbox) {
         yourtextbox.setSelectedEnd(yourtextbox.getLength());
    try this thing - not sure if it'll work, but I figgured out how to apply it to my textareas for keeping the focus on the last line of the textarea..it might work for your textboxes..
    shrug

  • Question: how to get the adobe plug in to play a downloaded flv file ?

    I want to know how to get the flv adobe plug in which i downloaded as a result abc or nbc or cbs.com i forget exactly which said i had to and also it seems to be used for playing most all videos from web such as those from utube,hulu, etc. So my question is how do i get the plug in to play any downloaded *.flv video ?  The particulars on the one i have is:
    Output folder: C:\WINDOWS\system32\Macromed\Flash
    Execute: "C:\WINDOWS\system32\Macromed\Flash\uninstall_plugin.exe"
    Extract: NPSWF32.dll
    Extract: NPSWF32_FlashUtil.exe
    Extract: flashplayer.xpt
    also perhaps FLVPlayer.swf of about 9Kb may have something to do with it?
    And the latest update i have was about jan 13 when it seemed to automatically take over my system and update itself.x
    I know it has the ability to do what i want- which is full screen cropped ,change aspect ratios etc. and seems
    It has to be able to or else it could not play the files and give those options which it does on some videos like from utube etc. in the first place. Unfortuneately it has something also to do with the useless *.swf files which are apparently of no use to anything and could certainly be eliminated .
      I have downloaded several freebie flv players such as bs player etc. etc. but they all have so many faults and are not suitable. Bs player does what i want but it hangs , have to go to system mgr. to get out of it sometimes , often difficult to use etc.etc. The main features is i need is to be able to make and play playlists to automatically in full screen one after the other in a specified order with NO user intervention and the ability to magnify or 'pan in' i guess they call it and change aspect ratios so that i can have full screen as if just cropping part of horizontal such as if want to view a 16/9 aspect ratio on a computer as i have with the prior standard 4/3 aspect and change a downloaded vertically stretched to a cropped instead etc.
        Also it doesn't make sense to download others and take up disk space when already have the adobe - also adobe seems to be the only one that plays hulu flv's correctly - on other flv players the video and audio are way out of sync and not just by few seconds but often by a minute or more. I know there is another 'pain' way to do it which is create a *.avi or other extension with loss of clarity etc. which have done but would like to be able to just do it in real time while playing the flv file itself as for example
    as bs player does.
       Anyway if there is no way to get adobe to do this does anyone know of any other free flv player downloads which will do what
    i want - basically playlists, magnify , pan,crop and still full screen, change aspect ratios -  other than bs player ?

    The plugin is what it is: a browser plugin - it cannot act as a standalone player.
    To play local flv files you either need to
    download/install the standalone player (Projector) from http://www.adobe.com/support/flashplayer/downloads.html
    download/install Adobe Media Player http://www.adobe.com/products/mediaplayer/

  • How to Get the Debugger Screen in WEB Front end of SRM

    Hi Gurus,
    I have couple of questions for SRM.
    1. How to Get the Debugger Screen in WEB Front end of SRM so i can debug the application which is running in EBP system??
    2. How to set the flag for external debugging (HTTP)??
    3. Using SICF how to set the ITS services ( Like BBPSC01 )for internal ITS so as soon as i place the order it should stop at the break point which i have set in the application.
    Thanks.
    Regards,
    Manoj Tiwari

    Setting up Debugging for Integrated ITS
    Tcode SICF.
    Select service (e.g. default_hostàbcàguiàsapàitsàbbpsc01).
    Change service settings and insert parameter ~GENERATEDYNDPRO=1.
    Find program to debug. E.g. SE93. Enter bbpsc01 à Display and get Program field (SAPLBBP_SC_UI_ITS)
    Execute SE38 and enter program name.
    Turn HTTP Debugging ON. UtilitiesàSettingsàDebugging. Click Actv and username.
    Add HTTP Breakpoint. Display source code and select Utilitiesàbreakpointsàset.
    On “External Debugging” select ‘HTTP Breakpoint’.
    Remember to remove breakpoints, deactivate debugging and remove parameter GENERATEDYNPRO.
    Can run program RSBREAKPOINTS to find which programs you have breakpoints set in.
    Have fun with EBP
    If you have any more questions i would be happy to help you. Send me mail on [email protected]

  • How to get the download option in Firefox 3.6.13. Earlier it was showing in the Navigation Bar

    How to get the download option in Firefox 3.6.13. Earlier it was showing in the Navigation Bar just beside where we see the URL.

    You can find the connection settings in Tools > Options > Advanced : Network : Connection
    See "Firefox connection settings":
    *[[Firefox cannot load websites but other programs can]]

Maybe you are looking for

  • How to show statistics of main item and related items with less filter?

    Hi experts, Have any of you come thro' similar requirements before? To show the statistics of a main item in different aspect in a document and show the comparison of this item in a particular aspect with other related items as inputted at prompt. Yo

  • Multiple images iPhoto 9.6 how make

    Using macbook air with iPhoto 9.6 trying to make multiple images of same photo for passport.  How use contact?

  • Eye Color adjustment brush question

    On the adjustment brush when I am using it to change eye color it doesn't change the color at all. I want to change it completely not just lighten it or give it a different tint or hue. I go to the adjustment brush, turn the saturation all the way do

  • Passing variables from AS3 to PHP

    Hi there I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php]. I've stuck with this for two days.. Here's what I have done. Please help!!! header.fla [Actionscript in the timeline] st

  • New document units.. Inches not pixels

    Hallo How do I make it so a new document in Photoshop uses Inches as its units instead of pixels? I have it set to inches in the preferences -> units & rulers but every time I make a new document it defaults to pixels for the dimensions. Is there a w