Typical Problem !! File Download UI related

Dear All,
I'm stuck in a typical problem. I upload files thru the File Upload UI and generate uique IDs against every upload document.
For displaying the documents, the user goes thru a web page that has URL to a WDA application.
This WDA application has the unique Number as application paramater.
The problem : If the default view of the WDA has a button and on click the uploaded file opens properly. But if I write the same code in WDINIT , the code gets executed but doesn't open the uploaded file. Reason??? I fail to understand !!!
Any help would be highly appreciated.
Regds,
Srini

Are you using the attach file to response API?  Basically in the WDDOINIT, the page is being built for the first time. Therefore the framework on the client side isn't rendered yet to be able to download a file.  If you want a file download to trigger "automatically" upon a page load; consider using a timedTrigger UI element set to 1 second and then download the content upon the event of the timedTrigger.
Is this WDA only being used to download the files via a Link?  If so consider if you really need WDA for this.  That's a heavy weight framework if you are only wanting to push the download of a file. A stateless BSP or even a ICF handler class might be much better options.

Similar Messages

  • Problem with file download option in ALV via ITS. Please help!

    Hi Experts,
           I have a ALV report which I have web enabled using ITS service. In the ALV there is a delivered functionality for file download. It works fine when the report is run in the SE80. But when I run the ITS service for the report and choose file download option it displays a page saying "this page has been diaplayed due to technical reasons" with title "File properties". In addition it looks for Java runtime in the browser. After all this it opens a popup window for selecting path and file name.
    This is not user friendly and many customers have rasied their concerns on it.
    My question is that,
    Q1: What is the need of this "File properties page"? Why ITS calls this while ABAP editor does not?
    Q2: Is there any way we can suppress this so that it directly opens a popup window for selecting path and file name?
    Please help me.
    Thanks
    Gopal

    Hello Klaus,
    i have also the problem with these intermediate screens!
    We have in between installed patch 22 for ITS 6.20 and SP18 at SAP Netweaver 2004!
    But they are still not processed invisible for the users.
    Are there any additional parameters, which controls this behaviour(~webgui_updown_make_visible is not used!)?
    How can i check, if i have really a.ex. the actual ws.jar-file or other related files of the patch?
    We are using the standalone ITS with an own (modified) IAC with an own CI-design for the webpages. The intermediate screens are displayed with the "normal" SAPGUI-design because of the parameter ~generatedynpro. Without this it does not work, because the template SAPLSIT_0100 is missing!
    Or do you have an example for such a intermediate template with the applet for an upload of a file?
    Thanks in advance
    Felix

  • Problem with File download in ALV via ITS. Please help!

    Hi Experts,
           I have a ALV report which I have web enabled using ITS service. In the ALV there is a delivered functionality for file download. It works fine when the report is run in the SE80. But when I run the ITS service for the report and choose file download option it displays a page saying "this page has been diaplayed due to technical reasons" with title "File properties". In addition it looks for Java runtime in the browser. After all this it opens a popup window for selecting path and file name.
    This is not user friendly and many customers have rasied their concerns on it.
    My question is that,
    Q1: What is the need of this "File properties page"? Why ITS calls this while ABAP editor does not?
    Q2: Is there any way we can suppress this so that it directly opens a popup window for selecting path and file name?
    Please help me.
    Thanks
    Gopal

    Hello Klaus,
    i have also the problem with these intermediate screens!
    We have in between installed patch 22 for ITS 6.20 and SP18 at SAP Netweaver 2004!
    But they are still not processed invisible for the users.
    Are there any additional parameters, which controls this behaviour(~webgui_updown_make_visible is not used!)?
    How can i check, if i have really a.ex. the actual ws.jar-file or other related files of the patch?
    We are using the standalone ITS with an own (modified) IAC with an own CI-design for the webpages. The intermediate screens are displayed with the "normal" SAPGUI-design because of the parameter ~generatedynpro. Without this it does not work, because the template SAPLSIT_0100 is missing!
    Or do you have an example for such a intermediate template with the applet for an upload of a file?
    Thanks in advance
    Felix

  • I am having problems downloading files from the web. After a number of files are downloaded, the system become sluggish, and then hangs. I traced the problem to the download history file: downloads.sqlite.

    After downloading a number of 1.0 MB files, the system became very sluggish, and I started to get lots of (Not Responding) messages when trying to download or just use Firefox for browsing. Using Performance Monitor, I observed that the Firefox executable was growing larger and larger - up to as large as 1.2 GB on a system with 2.0 GB memory. Page faults were off the chart.
    Looking for a similar problem, I found one that discussed the downloads.sqlite file becoming corrupted. I first noticed that this file was over 600 MB in size, so I deleted it. I then downloaded additional files, and observed that the new downloads.sqlite file would increase in size by about 150% of the size of each file that was downloaded. Once it would get up to 500 MB in size, the system started slowing down again.
    I don't know the purpose of this file, but it appears that it keeps a full copy of every file downloaded, which may be the function of a download history file, but it does not seem correct that the file should grow in size without limit, and thus impact the system.
    I would also appear that the Firefox executable is trying to read the entire contents of this file each time a new file is downloaded, which does not seem right.
    Temporary fix is to periodically delete the downloads.sqlite file when it gets too large and starts impacting performance.. Apparently it is smart enough to open a new file if the old one is not found. I am not sure what the correct behavior for this file should be. Apparently is does not re-initialize when a new Firefox session is initiated.
    Please feel free to contact me if more information is desired. I'm not sure what details you might need to troubleshoot this type of problem.

    Hi Katy, and a warm welcome to the forums!
    What is the exact name of the file?
    Is it aim.bin?
    Which requires either Stuffit Expander, or the Unarchiver to deflate.
    http://www.apple.com/downloads/macosx/systemdiskutilities/theunarchiver.html

  • I am using Windows XP SP3, I have problem with file download while resuming downlod giving error "file...could not be saved, because the source file could not be read." Please help me

    I am using Fire Fox 5 beta version. After pausing the long file download, when I press the Resume download button the above message appear each time asking "Contact to Administrator". This problem was not with Fire Fox version 3 and above. Please Help Immediately. Thanks in advance...

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • Japanese character problem while downloading file to application server

    Hello All,
    We are facing a strange problem while downloading a file to application server when file contains japanese text.
    We are downloading vendor and customer information in a flat file format on application server. When the login language is EN program show ouput in a properly formatted manner.
    When the login language is JA (japanese) program does download file with customer vendor data. I can see the description is japanese language but the formatting is gone for a toss.
    We are facing similar issue with other programs downloading files on the application server.
    I am using OPEN DATASET........ENCODING DEFAULT. and working on unicode enabaled ECC 6.0 system
    Quick help appriciated.
    Thanks!

    Hi
    Sometimes this also happens because of your desktop setting.Make sure that your OS also supports the JAPANESSE language.
    Ask your technical support team to enable them in your desktop.
    Thanks & Regards
    Jyo

  • Problem in File Download

    In some thread, i had this problem with file download that instead of opening File Save..popup, the contents of file on the server were being rendered statically as HTML. I have figured out the solution to that but now the thing is in every file, there are some \n\r being added in the beginning of the file. Can anybody help. Here's is my code.
    <%@ page import="java.io.*"%>
    <%
         try
              response.setContentType("APPLICATION/OCTET-STREAM");
              String strProjectInfoPageHeader = "Attachment;Filename=\"" + request.getParameter("txtProjectInfoPageFileName") + "\"";
              response.setHeader("Content-Disposition", strProjectInfoPageHeader);
              File fileToDownloadProjectInfoPage = new File(request.getParameter("txtProjectInfoPageFilePath"));
              FileInputStream fileInputStreamProjectInfoPage = new FileInputStream(fileToDownloadProjectInfoPage);
              int varProjectInfoPage;
              while ( (varProjectInfoPage=fileInputStreamProjectInfoPage.read()) != -1 )
                   out.write(varProjectInfoPage);
              out.flush();
              out.close();
              fileInputStreamProjectInfoPage.close();
         catch(Exception e)
              out.println(e);
    %>Thanks and regards
    Vikram

    JSPs will invariably have newlines and whitespace in them, even if you don't explicitly put them. Instead of wasting time trying to fix it, just move your code to a servlet and map it to the same path. That's the fastest and most sensible solution. It also follows the convention that JSPs are to be used for display only and servlets for processing.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://www.catb.org/~esr/faqs/smart-questions.html
    ----------------------------------------------------------------

  • Problem With File Download Dialog Box

    Hi all,
    I have jsp page that allows a user to export oracle data to excel.
    I have these code in my page:
    <%@ page contentType="application/vnd.ms-excel" %>
    response.setContentType ("application/vnd.ms-excel");
    response.setHeader ("Content Disposition",
    "filename=\"historicalrate.xls\"");
    I run the page and it popups a file download dialog box with Open and Save buttons.
    When I click the Save button a Save As window opens with a hr.xsl file name and Microsoft Excel Workbook(*.xls) as save type. It is what I want.
    The problem I have is when I click the Open button on the file download dialog box it displays data in excel format on a browser well. Then I click File > save as on browser's tool bar the Save As window pop up with no file name and a default Text(tab delimited)(*.txt).
    I need the file name and Microsoft Excel Workbook(*.xls) as default save type.
    Any help would be greatly appreciated.
    Please help
    Thanks

    I have the same problem with hui_ling.
    When user click on "Open", Excel start and open excel file correctly but the file name on excel title bar. 'Cause the file name is in Japanese characters. Any one can help me?
    Message was edited by:
    TNTVN

  • Unwanted File Download box in JSF - Problem while Saving State.

    Hi,
    I am having a situation wherin there are multiple command links dynamically generated in a dataTable.When I click on any one of the links a file download dialogue pops up to save/open a pdf doc.Irrespective of any operations on the download dialogue, if I click on anyother link (i.e this is the 2nd click on tat page)
    then the file download doesnt pop up and instead the page is refreshed.
    On the 3rd click , the file download again pops up.
    The code in the action method of the command link goes like this
    public void showPDF() {
    byte[] pdf = // gets the data from another place.
    FacesContext faces = FacesContext.getCurrentInstance();
              HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
              response.setContentType("application/pdf");
              response.setContentLength(pdf.length);
              response.setHeader("Content-disposition", "attachment");
              response.setHeader("Cache-Control", "cache, must-revalidate");
              response.setHeader("Pragma", "public");
              try {
                   ServletOutputStream output = response.getOutputStream();
                   output.write(pdf);
              } catch (IOException e) {
                        log.debug("IOException in viewPdf: " + e.toString());
         faces.responseComplete();
    }To fix the above problem ...I have included the following 2 lines of code just before invoking the responseComplete() method :
      StateManager stateManager = (StateManager)    
                                                                    faces.getApplication().getStateManager();
         stateManager.saveSerializedView(faces);This solves the above problem but causes another problem for which I need help :
    There is a value change listener in my jsp.When I change the value in a drop down list in the same page, the file download dialogue is poping up. which shuld only pop up when am clicking any one of the command links.
    I debugged thru the code and found out that after the value change listener action method is finished executing it jumps and executes the above showPDF() method.
    Seems its something to do with saving of the client state.
    It will be of great help anyone can advise on this.
    Thanks
    Archan

    Hi,
    I am having a situation wherin there are multiple command links dynamically generated in a dataTable.When I click on any one of the links a file download dialogue pops up to save/open a pdf doc.Irrespective of any operations on the download dialogue, if I click on anyother link (i.e this is the 2nd click on tat page)
    then the file download doesnt pop up and instead the page is refreshed.
    On the 3rd click , the file download again pops up.
    The code in the action method of the command link goes like this
    public void showPDF() {
    byte[] pdf = // gets the data from another place.
    FacesContext faces = FacesContext.getCurrentInstance();
              HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
              response.setContentType("application/pdf");
              response.setContentLength(pdf.length);
              response.setHeader("Content-disposition", "attachment");
              response.setHeader("Cache-Control", "cache, must-revalidate");
              response.setHeader("Pragma", "public");
              try {
                   ServletOutputStream output = response.getOutputStream();
                   output.write(pdf);
              } catch (IOException e) {
                        log.debug("IOException in viewPdf: " + e.toString());
         faces.responseComplete();
    }To fix the above problem ...I have included the following 2 lines of code just before invoking the responseComplete() method :
      StateManager stateManager = (StateManager)    
                                                                    faces.getApplication().getStateManager();
         stateManager.saveSerializedView(faces);This solves the above problem but causes another problem for which I need help :
    There is a value change listener in my jsp.When I change the value in a drop down list in the same page, the file download dialogue is poping up. which shuld only pop up when am clicking any one of the command links.
    I debugged thru the code and found out that after the value change listener action method is finished executing it jumps and executes the above showPDF() method.
    Seems its something to do with saving of the client state.
    It will be of great help anyone can advise on this.
    Thanks
    Archan

  • Problem in XML file download

    types: begin of type_s_data,
             record(65000) type c,
           end of type_s_data.
    data: w_xml_out type string.
    data: t_xml_tab type table of type_s_data with header line,
    Source code
          t_code    type table of type_s_data with header line,
    After populating t_code table,
    convert internal table data into XML document
      call transformation id
           source code = t_code[]
           result xml w_xml_out.
    append XML docu to internal table
      append w_xml_out to t_xml_tab.
    Download to XML file
      call function 'GUI_DOWNLOAD'
        exporting
      BIN_FILESIZE                    =
         filename                        = filename
         filetype                        = 'BIN'
        append                        =
      write_field_separator           = sep
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
        tables
         data_tab                        = t_xml_tab
      FIELDNAMES                      =
        exceptions
         file_write_error                = 1
         no_batch                        = 2
         gui_refuse_filetransfer         = 3
         invalid_type                    = 4
         no_authority                    = 5
         unknown_error                   = 6
         header_not_allowed              = 7
         separator_not_allowed           = 8
         filesize_not_allowed            = 9
         header_too_long                 = 10
         dp_error_create                 = 11
         dp_error_send                   = 12
         dp_error_write                  = 13
         unknown_dp_error                = 14
         access_denied                   = 15
         dp_out_of_memory                = 16
         disk_full                       = 17
         dp_timeout                      = 18
         file_not_found                  = 19
         dataprovider_exception          = 20
         control_flush_error             = 21
         others                          = 22.
      if sy-subrc <> 0.
        message e016 with 'Error during file download'(002).
      endif.
    Problem here is when intrernal table data/size is large, only part of the data is getting displayed in the file and at the bottom of the file showing an error message
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End element was missing the character '>'. Error processing resource 'file:///C:/Documents and Settings/sowjanya.suggula/De...
    RECORD
    ^
    >RECORD>
      </item>
    wehn i change data  declaration as
    data: t_xml_tab type table of string with header line.
    when i execute the program, giving me a short dump.please suggest me a soluion for this.
    Regards,
    Sowjanya

    Hi Sowjanya,
    Kindly go through this link below:
    It Uploads XML to internal table and vice versa :
    Upload XML to internal table and vice versa in SAP 4.6C
    Hope it helps
    Regrds
    Mansi

  • Excel File Format Problem while downloading in ALV Grid

    Hi All,
    My program gives an ALV Grid Output which contains the file download button , when I choose spread sheet as the file format , the actual data starts only from 4th line and the lines above it contain date, heading etc and the rest are blank. Is it possible that I can download only the records in the grid output with the column names and not the unnecessary log?
    Also the format is not proper excel format, this same file will be used for upload into another program using the Function Module 'TEXT_CONVERT_XLS_TO_SAP'. When I load the file saved in the above format, this Function Module always fails.
    Please let me know any solution for this problem
    Thanks in Advance.

    Hi
    try this code----
    *&      Form  DOWNLOAD_EXCEL_TEMPLATE
          text
    -->  p1        text
    <--  p2        text
    FORM download_excel_template .
      TYPES: BEGIN OF lt_data,
                field1(20),
                field2(30),
                field3(20),
                field4(20),
                field5(20),
                field6(30),
                field7(15),
                field8(10),
                field9(10),
                field10(20),
                field11(20),
                field12(10),
                field13(20),
                field14(20),
              END OF lt_data.
      DATA: lv_file TYPE rlgrap-filename,
            li_data TYPE STANDARD TABLE OF lt_data,
            wa_data TYPE lt_data,
            lv_pathcheck type c,
            lv_file1 type string.
      wa_data-field1 = ''.
      APPEND wa_data TO li_data.
      REFRESH gi_header.
      wa_header-name = 'Company Code'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Main Asset Number'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Asset Sub Number'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Document Date'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Posting Date'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Asset Value Date'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Item Text'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Reference'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Allocation'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Amount Posted'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Percentage Rate'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Quantity'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Prior-Yr Quantity'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Curr-Yr Quantity'.
      APPEND wa_header TO gi_header.
      lv_file = gv_file.
      lv_file1 = gv_file.
      CALL METHOD cl_gui_frontend_services=>directory_exist
        EXPORTING
          directory            = lv_file1
        RECEIVING
          result               = lv_pathcheck
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
       FIND '.xls' IN lv_file IGNORING CASE.
      IF sy-subrc = 0.
        REPLACE '.XLS' IN lv_file WITH ' ' IGNORING CASE.
      ENDIF.
      FIND '.TXT' IN lv_file IGNORING CASE.
      IF sy-subrc = 0.
        REPLACE '.TXT' IN lv_file WITH ' ' IGNORING CASE.
      ENDIF.
      CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          file_name                 = lv_file
          data_sheet_name           = 'DATA'
        TABLES
          data_tab                  = li_data
          fieldnames                = gi_header
        EXCEPTIONS
          file_not_exist            = 1
          filename_expected         = 2
          communication_error       = 3
          ole_object_method_error   = 4
          ole_object_property_error = 5
          invalid_pivot_fields      = 6
          download_problem          = 7
          OTHERS                    = 8.
      IF sy-subrc <> 0.
        MESSAGE ID gv_msgid TYPE 'E' NUMBER 002.
      ENDIF.
    ENDFORM.                    " DOWNLOAD_EXCEL_TEMPLATE
    regards,
    Prashant

  • PDF Report file download problem

    Hi,
    I am using ApEx 3.1 and Oracle 10g and XSL-FO
    I have a problem in downloading a PDF file:
    (1) I have a report query (produced an xml file), report template, and report layout.
    After I linked the new PDF report into my application, when I click on the button, the PDF “File Download” popup shows only two buttons (“save” and “cancel”) with a warning message “The file you are downloading cannot be opened by the default program. It is either corrupted or it has an incorrect file type. As a security precaution, it is recommended that you cancel the download”, and the file name shows up as “f.pdf”. I am able to open the saved file (f.pdf) in Adobe Acrobat and it looks fine.
    (2) In “Home>Application Builder>Application xxx >Shared Components>Report Queries>Edit Report Query”, when I click on the “Test Report” button, the “File Download” popup shows with all three buttons, (“open”, “save”, “cancel”) --- it shows the correct name of the file, and, no warning message! At this point, the file can be opened with the “open” button”, or, be saved to the disk. The saved file opens with Adobe Acrobat and the contents are identical to that of the file “f.pdf”.
    (3) I created another application (within the same workspace) with just one page, linked the PDF report in this application, and clicked on the button, and got the same response as in (2).
    It looks like I could try to create a new application by copying page by page from the application quoted in (1), and see if that would solve the problem. It is time consuming, the outcome is uncertain, and also could create some other problems
    What could be the cause of this problem? Any alternatives? I would appreciate any help.
    Thanks
    Vasan

    We experienced the exact same problem as the OP (including corrupt files named "f.pdf" and the browser dialog box he documented). Don't know if his environment is similar, but here is how we fixed our issue:
    Our app uses an Authentication Scheme that includes under "Page Session Management" a "Session Verify Function" called like this: "return timeout_pkg.check_timeout;". This timeout_pkg I think came from code originally posted here, it works well so thanks to the original coder. However it does present a small issue in that it rewrites the mime headers in the server response in one use case. Since it is rewriting the headers to "text/html" even though we are sending back a report where the mime header should be "application/pdf", the client gets confused and the result is the symptoms the OP posted.
    So if we change the timeout package and body so the signature is like this: "function check_timeout (p_request IN VARCHAR2 DEFAULT null) return boolean;"
    And change the call in the "Session Verify Function" to pass the request as a parameter like: "return timeout_pkg.check_timeout(:REQUEST);"
    And change the body of the timeout_pkg.check_timeout function to use the correct mime type when calling a report:
    elsif not g_cookie_already_sent then
    if (p_request is not null and INSTR(p_request, 'PRINT_REPORT') != 0) then
    owa_util.mime_header('application/pdf', FALSE);
    else
         owa_util.mime_header('text/html', FALSE);
         end if;
    then we solve our particular problem... I hope this saves somebody else some time, remember this was our specific solution to the exact symptoms documented by the OP, however as a general rule I would say if you are experiencing problems with pdf printing from Apex, watch out for anything your app might be doing with the owa_util pkg in particular and mime headers in the server response in general.
    Edited by: cmcneil on Sep 5, 2008 11:45 AM
    Edited by: cmcneil on Sep 5, 2008 11:59 AM

  • I can not do the update , what should I do to fix this error ? "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    I can not do the update , what should I do to fix this error ?
    "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    Hi,
    Please refer to the help document below:
    Error downloading, installing, or updating Creative Cloud applications
    Regards,
    Sheena

  • Problem with FIle DownLoad

    Hi All,
    I am working on project where I need to display all the files (on the UI screen)which are in  windows folder with a download link.
    I used IWDDownload UI element for  downloading the file. Its working fine but problem is , when ever I download a file for first time its working fine. Later what ever I download other files, I was able to see only first file download. I guess this is problem with context binding but I am not sure.
    I used for loop to iterate all the files in folder and I binded the file name to IWD Download UI element using bindText option.I am creating UI elements dynamically in wdDoModifyView and it will call another method to bind to context.(As SAP Suggested not to modify any context elements in wdDoModifyView method).
    Please help me in this regard.
    Ramesh

    Ramesh,
    You need N dynamic binary attributes or IWDResource (in newer versions), one per file. Create them either in wdDoInit of view or in some suitable action handler.
    Then you have to populate IWDResource or set bytes of binary attributes. Check corresponding WD tutorials how to do this.
    In wdDoModifyView create IWDFileDownload control per every attribute and bind either "data" property (to binary attribute) or "resource".
    Valery Silaev

  • Problem on downloading a zip file

    I am having a problem on downloading a zip file(file size is about 2Mb). Sometimes I can get a complete file and can open the file, sometimes the zip file is chunked(the file size is smaller than the right one), so I can't open it.
    The file content is stored in a blob field. The code first goes to database get the blob as inputstream, then copy the inputstream into response.getOutputStream().
    The problem is unpredictable. Even for the same blob data, sometimes I can get working file, sometimes I just get crapped file.
    Could somebody help me out? I am struggling with it.
    Any input is appreciated!
    public class DownloadTextAction extends Action implements Serializable{
        private static Log log = LogFactory.getLog(DownloadTextAction.class);
        public ActionForward execute(ActionMapping mapping, ActionForm form,
                                     HttpServletRequest request,
                                     HttpServletResponse response) throws Exception
            ActionErrors errors = new ActionErrors();
            String batch_id = (String)request.getParameter("batch_id");
            String fileName = batch_id+".zip";
            try
    //          response.setContentType("application/octet-stream");
              response.setContentType("application/download");
      //        response.setContentLength(content.length());
    //          response.setHeader("Content-Disposition", "inline; filename=\""
    //                    + fileName + "\"");
              response.setHeader("Content-Disposition", "attachment; filename=\""
                        + fileName + "\"");
              InputStream in = untilService.getBlob(batch_id);         
              OutputStream out = response.getOutputStream();
              FileHelper.copy(in, out);
              out.flush();
              in.close();
              out.close();
            catch (Exception e)
              errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.detail", e.toString()));
              saveErrors(request, errors);
              log.error(e.toString());      
            return mapping.findForward(Constants.SUCCESS);
        }

    Maybe a fault in the missing FileHelper.copy() method?

Maybe you are looking for

  • [svn:fx-trunk] 9056: * Cleaned up deprecated warnings in rpc build.

    Revision: 9056 Author:   [email protected] Date:     2009-08-04 07:56:55 -0700 (Tue, 04 Aug 2009) Log Message: Cleaned up deprecated warnings in rpc build. Reviewer: Gordon Tests run: checkintests Is noteworthy for integration: Yes, rpc.swc has been

  • Why same custom designed item looks different on different MIDP phones?

    Same MIDP application looks different on different phones, which is obvious. But the sizes of custom items are also looks different, which is some thing trouble some. IE the custom designed button of size say 50 X 20, looks proper on BlackBerry MIDP

  • Reg: User exits used in pa40 and pb10

    Hi Experts, I need to find user exit in pa40 and pb10 main program ,where i can capture fields like RCINS (vendor ID) and offid (advertisement ) and need to update applicant details  into my z table.

  • Device locked by ex employee's personal icloud account

    Hi, company's iphone 5 is locked by "Find my iPhone" app - attached to ex employee's personal iCloud account. This page http://support.apple.com./kb/TS4515 states that the device has to be removed from icloud account first, in order to finish restore

  • Old Apple ID purchases transfer to new Apple ID for access in iCloud?

    Years ago I decided to switch my apple ID to a different email address (my old @me.com address). I now cannot access some of my purchased songs from those old Apple IDs via the iCloud since they're associated to the old Apple ID. Is there any way tha