Download excel file in Weblogic 6.1

          Hi,
          Hope this is an easy question and I can get the answer quick.
          In WLS5.1, we set the weblogic.httpd.mimetype.application/msexcel for file extensions
          .xls and .csv so that user will be able to download the file from their browser.
          When we migrate to WLS6.1, I added the following configuration to web.xml:
          <mime-mapping>
          <extension>xls,csv</extension>
          <mime-type>application/msexcel</mime-type>
          </mime-mapping>
          However, whenever the user requests a download and a .csv file is dynamically
          generated, they will never been given the download window any more. Instead, the
          .csv is opened inside the browser.
          Our code to point to the file is:
          response.sendRedirect("***.csv")
          Could anybody tell me what's wrong? The same code worked perfectly in WLS5.1.
          Thanks,
          Jenny Chen
          WCG
          

Are you sure that is the only difference, and not (perhaps) a difference on
          the client? If so, you need to compare the URL and response headers because
          the answer will be in one of those (and it sounds like the URL will be the
          same, so it must be a different header!).
          Peace,
          Cameron Purdy
          Tangosol Inc.
          << Tangosol Server: How Weblogic applications are customized >>
          << Download now from http://www.tangosol.com/download.jsp >>
          "Jenny Chen" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Hi,
          >
          > Hope this is an easy question and I can get the answer quick.
          >
          > In WLS5.1, we set the weblogic.httpd.mimetype.application/msexcel for file
          extensions
          > xls and .csv so that user will be able to download the file from their
          browser.
          > When we migrate to WLS6.1, I added the following configuration to web.xml:
          >
          > <mime-mapping>
          > <extension>xls,csv</extension>
          > <mime-type>application/msexcel</mime-type>
          > </mime-mapping>
          >
          > However, whenever the user requests a download and a .csv file is
          dynamically
          > generated, they will never been given the download window any more.
          Instead, the
          > csv is opened inside the browser.
          >
          > Our code to point to the file is:
          > response.sendRedirect("***.csv")
          >
          > Could anybody tell me what's wrong? The same code worked perfectly in
          WLS5.1.
          >
          > Thanks,
          > Jenny Chen
          > WCG
          >
          >
          

Similar Messages

  • URL Link on downloaded Excel File

    Hi,
    I have got a requirement.
    For study and analysis purpose user download data on excel file from OCOD. Struture(Contents) of downloaded excel file is same as screen.
    But the problem is when user click on 'DETAIL' (which has URL link) he/she is directed to Live OCOD and asked for log in with ID and Password, even if
    user is logged in OCOD.
    What i want to do is.
    1) Download Excel file without any URL link.
    2) If 1) is not possible then do not want to have 'DETAIL' option of downloded file.
    3) Method for avoiding relog into OCOD.
    Thanks in Advance
    Yuj

    Yuj, within the application click on the Training and Support link in the upper right, then click on Add-On Applications, then click on Reports and Analysis for Excel Template. In order to take the webinar click on Browse Training, then click on Training Resources by Job, then click on All Users, then click on Using Mail Merge for Word and Reports and Analysis for Excel with Oracle CRM On Demand.

  • In SAP Webdynpro using ABAP,how to colour the downloaded excel file?

    Hi all Experts'
    I have downloaded the data from the webdynpro application into an excel file in the presentation server using a custom button in a layout of a view in the webdynpro component.
    Now the requirement is to colour the column heading names and the downloaded excel file should show the full column length.
    Could anybody help me on this how to do this two things.
    Thanks in advance.

    Hi,
    You can use this function GUI_EXEC.
    Let say you want to use winzip to zip the file then what you should do like this:
    use this command --> ' -min -a D:\WALCOTT.ZIP D:\MBARANG.TXT'
    D:\MBARANG.TXT --> path to the file you want to Zip
    D:\WALCOTT.ZIP --> result zip file
    The command above is depends on the software you use to zip.
    then
      DATA: cmdguiexec(150).
      cmdguiexec = cmd.
      CALL FUNCTION 'GUI_EXEC'
        EXPORTING
          command          = cmdguiexec.
    Hope this help you.
    Best Regards,
    Victor.

  • Download Excel file from  from a second server

    Hi,
    In our Java based web application (jsp pages) users need to download Excel files stored on a different server (business tier) than the first application server server that hosts only the presentation tier.
    For security reasons users don't access the second application server. From a technical point of view what's the best solution to answer this requirement ? The logic should be the following: the user clicks on a report name that is displayed on this browser, the request is sent to the first application server that will retrieve the report stored on a second server and will return it to the user.
    Thanks a lot.

    it's been a while since i've done ejb stuff, but i believe you can configure an ejb to "runas" a different user. so, you would configure an ejb on the accessible server to "runas" a user who has access to the secondary server.

  • Filename of downloaded Excel file

    I frequently download Excel files from a website that seems for the most part windows centric. These excel files have an extension of .xls, I can double click them to open, but when opened they just have the file name of WORKSHEET. If I rename the file in the finder the same thing happens. If I try to open the file in numbers I get something like
    <table border="1">
    <!-- <tr><td colspan = "15" valign="middle" align="center">Date: 8/1/2008</td></tr>-->
    <!-- <tr><td colspan = "15" valign="middle" align="center">Investor's Business Daily Æ</td></tr> -->
    <tr><td colspan = "15" valign="middle" align="center">Investor's Business Daily 100</td></tr>
    <tr><td colspan = "15" valign="middle" align="center">Data as of 8/1/2008 market close</td></tr>
    Any idea? Now I have to open the file in excel, then do a save as, type in the file name (if I don't want WORKBOOK), then delete (or write over) the original file. What can I tell the website people?

    Hello ,
    In my procedure i am passing id and with the help of that id , ia am fetching values from the database.
    i have declared on clob type variable say v_insert where i am storing table structure(like worksheet) which i need on excel
    example
    v_insert := v_insert||'<tr>';
            v_insert := v_insert||'<td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td><b>Column1_Value</b></td> <td>abc</td>';
        v_insert := v_insert||'</tr>';then i am converting that clob into blob and storing the content into BLOB type variable say v_blob
    below is the code used for downloding the blob content.
    wpg_docload.download_file(v_blob);Thanks,
    Jitendra

  • Where are the Download Excel Files going?

    Safari 6 seems to download Excel files as requested from a web site but they do not appear anywhere in the Download Folder I have specified. The site successfully downloaded the files before I upgraded to Safari 6. I now have to switch to Firefox to download these files.  Where are they going?

    Erik Lommers (guest) wrote:
    : What happened to the files? Yesterday I tried to download the
    : different trunks of the ora805 file and suddenly everything
    : stops.
    : The ftp-server is there, but the whole linux directory is gone!
    : Does anyone have an explanation?
    : When will the files be available again?
    Point your browser to:
    http://www.oracle.com/products/trial/html/trial.html#oracle8
    null

  • Dump - While downloading Excel file in Back Ground job.

    Hi Friends,
    I am running a report program in BackGround mode and Downloading an Excel file.
    Getting the following dump report. (Working in 4.6C)
    ABAP/4 processor: RAISE_EXCEPTION
    Job cancelled
    Help me to resolve this.
    000380       CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
    000390         EXPORTING
    000400           DIRECTORY                   = FILE
    000410           FILTER                      = ''
    000420           FILES_ONLY                  = 'X'
    000430   *    DIRECTORIES_ONLY            = 'X'
    000440         CHANGING
    000450           FILE_TABLE                  = filetab
    000460           COUNT                       = count
    000470         EXCEPTIONS
    000480           CNTL_ERROR                  = 1
    000490           DIRECTORY_LIST_FILES_FAILED = 2
    000500           WRONG_PARAMETER             = 3
    000510           ERROR_NO_GUI                = 4
    000520           others                      = 5.
    000530
    000540       IF SY-SUBRC <> 0.
         >         RAISE CNTL_ERROR.
    000560       ENDIF.
    I am calling the methods as shown below.
    CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                = l_file
          write_field_separator   = 'X'
        CHANGING
          data_tab                = i_header
        EXCEPTIONS
          OTHERS                  = 22.
      IF SY-SUBRC NE 0.
       MESSAGE S208(05) WITH 'File download is failed'.
      else.
       MESSAGE S208(05) WITH 'File downloaded to specified path'.
      ENDIF.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                = l_file
          append                  = 'X'
          write_field_separator   = 'X'
        CHANGING
          data_tab                = i_output
        EXCEPTIONS
          OTHERS                  = 22.
      IF SY-SUBRC NE 0.
       MESSAGE S208(05) WITH 'File download is failed'.
      else.
       MESSAGE S208(05) WITH 'File downloaded to specified path'.
      ENDIF.
    Regards,
    Viji

    HI Vijayalakshmi,
    you are using cl_gui_frontendsevices...class in background...
    Is it possible to use this class in the background??
    Plz check once...
    Regards,
    Vamshi

  • How to download Excel file in JSP Page

    Actually I have a page
    Where I am uploading the files to server and it is listing the files which are all uploaded to the server.
    If I try to click the file which is uploaded it has to download to the local system.
    DOC, TXT, PDF, PPT. These file formats are try to download to local. But Excel file, opening the file content only not downloading to local.
    Any solution

    Hi Bangalore:
    As my experience,there may be some symbol such as "\r\n" was added in the content of the Excel file you want to download. this is no porblems to text format file, but to binary format file, such file can not be open. So I suggest you check-up the content of the file befor it was writed to the client, remove unwanted symbol, it should be word!
    I'm a newer to the here , and my english is poor. I thirst for intercommunion, I'm sorry for the syntax error in my reply.

  • Download Excel file through Web dynpro with no windows open?

    Can we have a web dynpro application that just returns an Excel file in the response with no open windows? Similar to a java servlet that is used to download a Excel file?
    This basically means that I cannot use wdComponentAPI.getWindowManager().createNonModalExternalWindow()
    Java Servlet Code
    HttpSession session = request.getSession();      // get a handle on the session id
    response.setContentType("application/download");
    response.setHeader("Content-Disposition", "filename=RTIS_Report.xls");
    PrintWriter out = null;
    out = response.getWriter();
    String report = request.getParameter("REPORT");
    JCO.Table lines = download(request, session, report);
    for (int i = 0; i < lines.getNumRows(); i++) {
         lines.setRow(i);
         String content = lines.getString("LINES") + "\n";
         out.write(content);
         out.flush();
    out.flush();
    out.close();

    Hi,
    I think you can use IWD Cached Web Resource to achieve this..
    See the below code FYI..
    public void downloadToExcel( )
        String fileName = "Customer" + ".xls";
         IWDCachedWebResource cachedExcelResource = null;
         try
              File f = new File("Customer.xls");
              WritableWorkbook workbook =   Workbook.createWorkbook(f);
              WritableFont black = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.BOLD,false,UnderlineStyle.SINGLE,Colour.BLACK);
              WritableCellFormat blackFormat = new WritableCellFormat(black);
              WritableFont blue = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.NO_BOLD,false,UnderlineStyle.NO_UNDERLINE,Colour.BLUE);
              WritableCellFormat blueFormat = new WritableCellFormat(blue);
              WritableSheet sheet = workbook.createSheet("Customer", 0);
                   Label label;
                   String[] header={"Corporate Code","Batch ID"};
                   for (int i=0;i<2;i++)
                        label = new Label(i,0,header<i>.toString(),blackFormat);
                        sheet.addCell(label);
                   WritableCellFormat integerFormat = new WritableCellFormat(NumberFormats.INTEGER);
                   jxl.write.Number number;
                   // Reading the contents
                   for(int i=0;i<wdContext.nodeVn_DownloadToExcel().size();i++)
                        String strCorpName = wdContext.currentContextElement().getVa_CorpCode();
                        String strBatchID =     wdContext.nodeVn_DownloadToExcel().getVn_DownloadToExcelElementAt(i).getVa_BatchID();
                        label = new Label(0,i+1,strCorpName,blueFormat);
                        sheet.addCell(label);
                        label = new Label(1,i+1,strBatchID,blueFormat);
                        sheet.addCell(label);
                   workbook.setColourRGB(Colour.LIME, 0xff, 0, 0);
                   workbook.write();
                   FileInputStream excelCSVFile = new FileInputStream(f);
                   IWDCachedWebResource cachedWebResource = null;
                   if (excelCSVFile!= null)
                        cachedWebResource = WDWebResource.getWebResource(excelCSVFile, WDWebResourceType.getWebResourceType("xls","application/ms-excel"));
                   cachedWebResource.setResourceName(fileName);
              cachedExcelResource = cachedWebResource;
              wdContext.currentContextElement().setVa_DownloadToExcel(cachedExcelResource.getURL());
              workbook.close();
         catch (Exception ex)
              wdComponentAPI.getMessageManager().reportException("Error in Excel Download"+ex.getMessage(),false);
    Regards,
    Vijay

  • Download excel file to PC in background

    Hi All,
    I need to write a report to local PC as an excel file. The program is working fine in foreground using cl_gui_frontend_services=>gui_download. However since the report data is very large, when the user runs the program in foreground, it always gets timeout. So it has to be run in background. I did a lot of research and tried the example posted here as well: http://abapblog.com/articles/tricks/33-create-xlsx-mhtml-file-from-internal-table-in-background
    But I am still not successful. I am getting ""control_flush_error". Does anybody have any ideas?
    Thanks,
    Meiying

    Hi ,
    cl_gui_frontend_services=>gui_download is for front end if you use this for background job scheduling it will throw dump !!
    so the solution is write a program to download the file to application  server using
    'OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE'
    and from there you can get the file.
    there is no way that you can schedule a program in background and store it on local PC.

  • Strange: When download excel file from Apex, it ask XDB username/password.

    Hi
    I'm using Apex 4.0.1 on Oracle 10.2.0.3, I have a application where end user can upload some file(excel/PDF/Word) as an attachment and later on they will download. Everything is fine but one thing:
    When User press the download button, a popup window asking you whether you want to open it or save it. when it's PDF/Word file, all works fine no matter what you choose; but when it's an Excel file, if we try to open it(press the open), it will popup a window saying 'XDB need a username and password'. But if you ingore it, it did open the file without any issue; If user press Save button, no issue at all.
    So the app still work but it's kind of annoying..
    Any one seen this before? Any idea?
    Thanks
    Mike
    Edited by: mike on Feb 24, 2011 1:47 PM

    You should open the excel file in binary mode, in that case, no errors will occur.
    Also, there is a very good package located on
    http://stareyes.homeip.net:8888/. It's free. The only thing is the server open
    for a certain hours during the weekday. 11:00amp to 7:00pm New York time zone.

  • Problem in downloading excel file

    Hi,
    I am downloading output of SQ01 into excel file using BDC, but windows system stores the whole data in one cell of sheet instead of all other cells.
      Please anybody tell me solution.
    Thanks & Regards,
    Umesh

    Hi,
    Check the followinf code:
      IF sy-ucomm = 'DOWNLOAD' AND sy-lsind = 1.
        DATA: fullpath      TYPE string,
            filename      TYPE string,
            path          TYPE string,
            user_action   TYPE i,
            encoding      TYPE abap_encoding.
        CALL METHOD cl_gui_frontend_services=>file_save_dialog
          EXPORTING
            window_title         = 'Gui_Download Demo'
            with_encoding        = 'X'
            initial_directory    = 'C:\'
          CHANGING
            filename             = filename
            path                 = path
            fullpath             = fullpath
            user_action          = user_action
            file_encoding        = encoding
          EXCEPTIONS
            cntl_error           = 1
            error_no_gui         = 2
            not_supported_by_gui = 3
            OTHERS               = 4.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        IF user_action <> cl_gui_frontend_services=>action_ok.
          EXIT.
        ENDIF.
    Ascii download
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = fullpath
       FILETYPE                        = 'DAT'
      tables
        data_tab                        = itab.
      ENDIF.
    Hope it will help you.
    Regards
    Rajesh Kumar

  • Download excel file to pc from sap

    Hi Experts,
    My requirement is After running the load program, if there are any errors with any of the records in Excel file, create an error file in Excel format and download to the selected file location.  Give an information message to the user if the load was successful or any error file was generated. A output of the report should show how many records were created and a kick out list of those with error.
    Thanks in Advance.
    Moderator message : Spec dumping is not allowed, search for available information. Thread locked.
    Edited by: Vinod Kumar on Sep 19, 2011 9:25 AM

    Hi,
    get error records into an internal table and pass that internal table to function module
    CALL FUNCTION 'GUI_DOWNLOAD'

  • Download Excel file using JSP

    Hi All,
    I am working on a JAVA/JSP application. JSP page passes the user inputs to JAVA page (using POST method) which queries to the database and generate an Excel file and returns the link for that file. I am displaying that link in JSP page ("Your file is successfully saved. Click here to download or view your file).
    Now what I want is when the user clicks on the link, open/save dialog will appear which give flexibility to the user to download or view the file in same JSP page. The problem is I don�t want to post again the data or dont want to open a child window. How to set the content type without posting it (I don�t know much about this). Is there any way to do this?
    Any help is highly appreciated. Thanx in advance
    Cheers
    Inderpal

    Hi
    Iam retreiving a file which is in image type in Ms SQl database, but while im retreiving the data from database using Servlet OutputStream the data is showing in binary format with all speciall symbols and text inside .Iamunable to find the solution for that,
    Pleas help me
    my code
              response.setContentType("application/msword");                    
                   OutputStream ros = response.getOutputStream();
              ros.flush();
                   ros.write(bt,0,bt.length);
    Thankz for ur help ,
    my id: [email protected]

  • Download Excel file in the Unix directory of Application server

    Hi Friends,
    I have a requirement  of downloading the Excel file in the Unix directory path of the application server,i just need your inputs,it would be great help if you can send any sample coding for downlading the file in the Unix directory?
    Regards
    Dinesh

    You can use the following fm
    RZL_READ_FILE
    or
    use OPEN DATASET FOR INPUT.

Maybe you are looking for

  • How do you change the default User in Windows 7 on a non-RAIDed 4 disk setup?

    Hi. I have installed Windows 7 Ultimate 64bit on Darling my new machine, which has a four-disk setup without RAID, like this: SSD OCZ -OS, Programs (C:) WD 2002FEAX - Media Projects (D:) WD 1002FAEX - Pagefile, Media Cache (E:) WD 1002FAEX - Previews

  • Mini shows up in Windows, but not in iTunes

    It shows up in My Computer, but not in iTunes. I honestly don't feel like trying anything on the website, because I have purchased music, and my cd burner is not working. I have now messed up iTunes by trying to reinstall it. Now whenever I open iTun

  • Smartforms issue with displaying line items

    Hi All, I had a requirement where in which in the main window Five line items and then the corresponding values of line items below in the same main window. Example :   01      item1_description       value1    value2   02      item2_description     

  • 2 silly questions what is boot camp and do I need it? & How to transfer PC

    Okay, I've just ordered my first mac it's a 17" 1.83 refurb iMac, I've noticed a lot of stuff about boot camp, what is it? Does it allow me to transfer my old pc files to my Imac? The only files I will be transfering are pictures and music files can

  • Oracle Access Manager 11gR2 Account Lockout URL

    I have question on OAM and OIM Integration LOCKOUT URL. Oracle 11gR2 documentation used is   Introduction - 11g Release 2 (11.1.2.1.0) Section 1.5.3.5 Account Lock and Unlock refers to account lockout url 4. The user's unsuccessful login attempts exc