BEA 9.2 Portal issue: downloaded CSV file contains embedded html code

We have J2EE application using BEA 9.2 Portal framework, and one of the page has feature to generate report( in pop up window) in CSV file format. As per the history from previous developer, BEA 8.1 didn't have this issue but, after mirgration to 9.2, they started having file download error( incomplete contents ..). To overcome this issue they commented out setting content length to HttpServletResponse as attached below, but this, now, causes html page source code of the parent page( where submit button is clicked to generate csv file report) being rendered along with actual report in the downloaded CSV file. Has anyone have this sort of issue? If so, can you please share your thoughts? or any thoughts in general?
BEA 9.2 with Portal framework, JDK 15, JSP, Beehive NetUI, Sun Microsystem Solaris server
Here is the source code that avoids setting content length and reasoning behind it..
private static void setResponseHeadersForCSVFile(HttpServletResponse response, String filename, int contentLength)
String mimeType = mimeTypes.getContentType(filename);
response.reset();
response.setContentType(mimeType);
// DON'T explicitly set the content length, since the length of the String or StringBuffer that contains
// the contents of the CSV file will be character encoded when it is actually written to the output stream, based
// upon the character encoding of this JVM App Server's settings. So let the JVM App Server framework apply the character
// encoding AND set the final and truly correct content length header at the time the contents of the String or StringBuffer are truly
// streamed back to the user.
//response.setContentLength(contentLength);
response.addHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"; size=" + contentLength);
}

1) Yes, the old content.tld is available as part of a web library module as a taglib.tld file. The module is: wlp-services-web-lib.war, which can be found in your bea/weblogic92/portal/lib/modules directory.
2) The new API is accessible from the ContentManagerFactory class. This provides access to INodeManager, ITypeManager, ISearchManager, etc. The new API is contained within the com.bea.content.federated package. The 8.1.x API in the com.bea.content.manager package including RepositoryManager, NodeOps, SearchOps, etc. has been deprecated with 9.2.
3) Yes, via the new I*Manager implementations. The entitlement support is for application-scoped visitor roles. Make sure you're using the ISearchManager when performing search operations. This will ensure secure results are returned.

Similar Messages

  • Download csv file with strange file name.

    hi, guys:
    We installed Oracle APEX 4.2, and APEX listener 2.0 and Oracle 11g standard edition for our application. But sometimes when user tried to download csv file from an interactive report, the file name was a very strange one, sometimes even no .csv extension. could anyone give me a hint to find documentation about it?
    Thanks.
    Sam

    lxiscas wrote:
    a little more information about it:
    I found the file name is "&P16_DIP_START_DATE NOA", which we expect to generate a file named as " some date NOA.csv", but APEX does not recognize the value of variable. For example, if teh value of P16_DIP_START_DATE is 11/15/2012, we expect the file name as "11/15/2012 NOA.csv", but APEX will give us very strange file name replaceing every "/" with / I appreciate anyone who could help me on this issue. But We did not encounter this [roblem on APEX 4.1, OC4J and Oracle 11g R2 enterprise.
    Thanks.
    I just used to_char to output date without "/" and soleved it. The other way is to set application property-->security-->browser security with basic level. This only applies to APEX 4.2. I am lucky for that I am using Apex 4.2.
    Sam
    Edited by: lxiscas on Jan 14, 2013 10:08 AM
    Edited by: lxiscas on Jan 14, 2013 10:10 AM
    Edited by: lxiscas on Jan 14, 2013 10:20 AM
    Edited by: lxiscas on Jan 14, 2013 1:36 PM
    Edited by: lxiscas on Jan 21, 2013 6:50 AM
    Edited by: lxiscas on Jan 21, 2013 6:52 AM
    I can has editing?Suspect you are trying to explain that "/"s are being rendered as <tt>&amp;#x2F</tt>? If you want to include character entities in forum posts then you have to type the ampersand ("&amp;") as an entity itself, thus: <tt>&amp;amp;#x2F</tt>.Windows or *NIX filenames can't contain "/"s anyway, so you can't use them regardless of how APEX is rendering them. Using a <tt>YYYYMMDD</tt> format is also recommended as it follows date order when using character comparison semantics.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Downloading csv file does not ask for where to store file

    Firefox is set to "Always ask me where to save files".
    I have a WebService from which to download a download.csv file via a POST request (must be a POST request and not a GET request due to data issues).
    I'm using jquery.fileDownload.js in the Website to achieve this. When pressing the download button, the screen 'Opening download.csv' opens with the option 'Save File' preset. After pressing OK, an explorer window should occur to be able to choose the file location. But it is NOT shown. Instead nothing more happens.
    What could be the problem?
    P.S.: in other browsers it works fine.

    Hello gnittala,
    thanks for your response.
    1. MIME type is set correctly.
    2. When using this config, the file is downloaded correctly.
    Now I found out, what was the problem:
    the jquery.fileDownload.js plugin was deleting the internally used iframe too early, so that the explorer window could not be displayed. Keeping the iframe longer (at least until explorer window is shown, or easier reuse it in next download call) solves the problem.
    Astridr

  • FLOW_EXCEL_OUTPUT_R error in the downloaded csv file

    Hello,
    I'm trying to use the functionality of the FLOW_EXCEL_OUTPUT_R as follows:
    href="f?p=&APP_ID.:14:&SESSION.:FLOW_EXCEL_OUTPUT_R&P_REGION_ID._en"
    Where the computation for P_REGION_ID is:
    SELECT region_id  FROM apex_application_page_regions
    WHERE        application_id = :app_id
    AND page_id = :app_page_id
    AND region_name = 'CSV export'
    In the downloaded CSV file i get the following:
    - the first row: +<||div id="report_33994800669487811_catch">+
    - the last 2 row: +<||pre>report error:+
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error<||/pre>
    (|| - sign is so I can show the tags in the post)
    The rest of the data is downloaded ok.
    But still how can i get rid of these errors?
    Thanks,
    Adela

    It seems that the problem was caused by the "_en" termination (FLOW_EXCEL_OUTPUT_R&P_REGION_ID.*_en*).
    But is there any way to get rid of the <||div id="report_33994800669487811_catch"> <||/div> tags from the begining, respective the end of the CSV file ?
    Thanks,
    Adela

  • Issue in CSV file attachment.

    Hi All,
             I am using the FM : SO_DOCUMENT_SEND_API1 for sending mails in CSV format. This CSV file contains some chinese scripts. But when I open the attachment I can see some junk characters instead of that. My SAP version is 4.6c
    I searched in all the forums and found these 2 solutions
    1. OSS note 633265 .
    2. Changed the characters set into simplified and traditional chinese.
    Both didnt helped.
    Suggestions are welcome.
    Regards,
      Dinesh.

    Hi Dinesh,
    again: Never use FM : SO_DOCUMENT_SEND_API1 . Go for CL_BCS. Check programs
    BCS_EXAMPLE_5
    BCS_EXAMPLE_6
    BCS_EXAMPLE_7
    BCS_EXAMPLE_8
    Regards,
    Clemens

  • If CSV file contains multiple structure...

    If CSV file contains multiple structures...then how should set vaules in file content conversion.
    pls mention any links regarding File Content Conversion
    thanks in advance..
    Ramesh

    Hi,
    You are using RecordSet. Here are some scenarios.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters - IDoc to File
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Proxy to File
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 - File to JDBC
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - File to ABAP Proxy
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] - File to Mail
    Regards,
    Wojciech

  • VISA: How to get the CSV file through C/C++ code?

    How to get the CSV file through C/C++ code?
    I'm communicating with a USB oscilloscope using VISA.

    Thank you for your reply.
    I am using Apache Commons File Upload. Here is the code where I got the "fi".
         DiskFileUpload fu = new DiskFileUpload();
              fu.setSizeMax(1000000000);
              List fileItems = fu.parseRequest(request);
             Iterator itr = fileItems.iterator();
              FileItem fi = (FileItem)itr.next();
              if(!fi.isFormField())
                File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef.getAbsolutePath());
         }

  • How can I link .svg files in the .html code?

    How can I link .svg files in the .html code?

    I use the FileBrowser app by Stratospherix to do this.  I can watch / stream my movies on my iPhone / iPad from my hard drive connected to my Airport Extreme.  I can access all the files on that hard drive as well. 

  • Interactive Report Download CSV file Issue (output includes separator BR)

    Hi,
    I have a Interactive Report and displaying the column values (multiple values in same ROW) as mentioned below.
    SQL Query
      select deptno,
           function1(empno) empno
      from emp
    IR Output
    Dept       Employee No
    10         AAA,BBB,CCC, ...    // -  Row 1
    20         XXX,YYY,ZZZ, ...    // -  Row 2 Now I want to display each employee in a new Line, so modified the SQL Query
    Modified SQL Query
      select deptno,
           REPLACE(function1(empno),',','<br>') empno
      from emp
    New IR Output
    Dept       Employee No
    10         AAA
               BBB
               CCC
               ...    // -  Row 1
    20         XXX
               YYY
               ZZZ
                ...    // -  Row 2 SO, Interactive Report Out put looks fine and that's the way we want.
    But the problem is when I download the Report in CSV or in PDF using the Action Menu -> Download..
    I am getting break line B R in the output, and also I have two different output in CSV for two different column. [Logic is same for both the columns.]
    CSV output1
    Employee No
      AAA<br>BBB<br>CCC
      XXX<br>YYY<br>ZZZI have other columns also with multiple values...for that column, I am getting the following CSV output
    CSV output2
    City List
      1111<br>
      2222<br>
      3333<br>So, in CSV for one column, I am getting all the values in same line with the seperator B R (Output1)
    for other column, I am getting values in new line with the separator B R. (Output2)
    Is there a way to FIX this CSV or PDF output for Interactive Report.
    I DON'T WANT THE SEPARATOR BR in CSV and also the values should always be in New Line.
    I want to have the following Output in CSV
    Employee No
      AAA
      BBB
      CCCThanks,
    Deepak
    Edited by: Deepak_J on Feb 24, 2010 11:45 AM
    Edited by: Deepak_J on Feb 24, 2010 11:46 AM
    Edited by: Deepak_J on Feb 24, 2010 11:48 AM

    Thanks.. Jari.. for the quick response.
    I updated my SQL query with Chr(10) and added the code in Page HTML header.
    Now the CSV & PDF output are fine..getting each individual value in seperate line (no BR tag)
    BUT in the Interactive Report Output, I am now getting first 2 values in 1 line, then next value in next line, and so on..
    IR Output
    Employee
      AAA BBB
      CCCCCCC
      DDDDDI have few more issues with CSV & PDF output
    1. In PDF is there a way to increase the column width, as for some of the columns, the values are getting truncated.
    2. For some of the columns in IR Report, I have user BR tag in Column Heading and this also come in CSV output (column heading with BR tag), is there a way to fix this. In PDF Column headings are fine (no BR tag)
    and by the way..what exactly this does.
    <style type="text/css">
    .apexir_WORKSHEET_DATA td{white-space:pre;word-wrap: break-word}
    </style>Thanks,
    Deepak
    Edited by: Deepak_J on Feb 24, 2010 12:20 PM
    Edited by: Deepak_J on Feb 24, 2010 12:21 PM

  • Issue when download CSV file

    hi all ,
    i have created a ALV report . and one of the column is 010 for example  ,when i download it as a CSV file , i found this field is shown as 10 instead of 010 .
    Is there a way to solve this ?
    best regards
    Kevin

    Hi,
    you can control the outputs in Spread sheets with the help of Excel control statement like replace etc throug ABAP program itself....
    ex: in XLS sheets you will get  00001 as 1.
        but in xls sheet if you put ' 00001 you will get output as 00001without depleting zero's.
    same we are applying through ABAP statement.
    so, for the final Itab field(which ever) you want to retain 00001 use the mentioned statements in my earlier post.
    Hope i am clear with my explanation. If you are in Doubt still get back to me..

  • Need help to download csv file in application by writting to outputstream.

    HI All,
    Requirment of my client is donloading CSV file from portal.
    My approach  is:
    On clicking "Download" button in JSP I am calling an action in controller and from here I am redirecting call to DownloadCSV.jsp where i am writing to output stream of response.
    Action called in controller:
         @Jpf.Action(forwards = { @Jpf.Forward(name = StaticConstants.SUCCESS, redirect = true, path = "DownloadCSV.jsp") })
         public Forward gotoReports() {
              Forward forward = new Forward(StaticConstants.SUCCESS);
              return forward;
    Download jsp:
    response.resetBuffer();
         response.reset();
         response.setContentType("application/vnd.ms-excel");
         response.addHeader("Content-Disposition", "attachment;filename="+ companyId +"_Audit_Report.csv");
         ServletOutputStream os = response.getOutputStream();
              os .println();
              os .print("DATE");
              os .print("USER");
    os .println();
    os.flush();
    os.close();
    I am able to download the csv file in excel. But after that i am not able to perform any operation in portal page. Mouser pointer becomes busy and cant click on anything.
    Second approach followed:
    I wrote the code for writting to outputstream of outputresponse in controller action itself and forwarded to the same jsp where my download button resides.
    Problem:
    Download happens perfectly but the excel in csv format contains the portal framework generated content also other than content i wrote to response.
    If u have any other approach to download an excel without redirecting to JSP plz let me know. Coing is being done in 10.2 weblogic portal.
    Please help. Its very urgent.
    Plz let me know how a file can be downloded in portal context without keeping a file at server side. I need to download file by writting to outputstream.
    If it is possible plz attach one small example project also.
    Thanks a ton in advance.
    It is very important plz do reply.

    Hi Srinivas,
    For downloading binary content that is not text/html, the Oracle WebLogic Portal content management tools use javascript in an onclick event handler to set the window URL to the URL of a download pageflow controller: window.location = url. The content management tools are in a portal so it should be possible for you to do the same thing.
    The url is a custom pageflow controller that streams the bytes to the response. It sounds like you already have a pageflow you could recycle to use in that way. You don't want to stay within your portlet pageflow because then you will be streaming bytes into the middle of a portal response. You want a separate download pageflow that you invoke directly, outside of the portal framework (in other words, don't invoke it by rendering a portlet that invokes the pageflow).
    You can set the url to invoke the pageflow directly by giving the path to the pageflow controller from the web root (remember the pageflow path matches the package name of the pageflow controller class) like this: "/content/node/nodeSelected/download/DownloadContentController.jpf"
    By the way, for the case of text/html, the tools uses a standalone portlet URL so that the text/html is not rendered in the browser window, which would replace the portal markup (because the browser renders text/html by default, instead of giving you a download widget or opening some other application to deal with the bytes).

  • Download CSV-File from Interactive Report

    Dear all,
    I want to download a CSV-File from a Interactive report.
    The content of the Rows in Excel:
    Erste,"B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"
    IBC ->,"-","1","2","3","4","5","6","7","8","9","10","11","12","13","14" [...]
    How can I solve this problem?
    Thanks for help.

    Your CSV-File use "comma" as separator. But Excel think, that CSV-File separator is "semicolon".
    Try to set "CSV Separator"=";" in section "Report Attributes" - "Download".

  • Add text to downloaded CSV file

    Hi.
    I'm trying to place a text at the bottom of the csv file, but I can not find the way to do it.
    What I'm trying to do is, after all rows downloaded in my csv file, I'd like to place a general comment in the next row regarding some information about the data I've downloaded.
    Is this possible?
    Thanks
    Ivo

    one of my colleagues might have a better answer for this, but one not-so-elegant way to get a message to display at the bottom of your csv output would be to manually put your own "download to csv" link on your page. have that link go to another page in your app that reports on the same query as your original report. put a region of type HTML right after your duplicate report region that displays the text you want to see in your csv output (be sure to use "No Template" for this region's template). change the report template of the second report region to "export: CSV". now when users click your manually added "download to csv" link, they'll be linked over to your other page. that page will immediately output the csv data as well as the additional line from your extra HTML region.
    hope this helps,
    raj

  • FF25 downloads csv files as text instead of csv - causes problems I have reset my profile, but it still the same problem. Fix?

    I have a csv file that I download once a week and load into excel. Yesterday FF25 decides that the csv file is a text file (it is not) and converts everything to text. This is a new and unwelcome problem. To my horror, I was forced to try opening in IE where it worked just fine.
    The FF open screen has
    filename.csv
    which is: text document
    from https://companyName.com

    This means that the server sends the file as text/plain (this may have changed if it didn't happen before).<br />
    Firefox always opens a file send as text/plain in a browser tab.<br />
    You can right-click the link and choose "Save Link As" to save the file or use "Save Page As" if the file opens in a tab.

  • Read and write a .CSV file contains cirillic characters issue

    Hi guys,
    I am a developer of a web application project which uses Oracle Fusion Middleware technologies. We use JDeveloper 11.1.1.4.0 as development IDE.
    I have a requirement to get a .csv file from WLS to application running machine. I used a downloadActinLinsener in front end .jspx in order to do that.
    I use OpenCSV library to read and write .csv files.
    Here is my code for read and write the .csv file,
    public void dwdFile(FacesContext facesContext, OutputStream out) {
    System.out.println("started");
    String [] nextLine;
    try {
    FileInputStream fstream1 = new FileInputStream("Downloads/filetoberead.CSV");
    DataInputStream in = new DataInputStream(fstream1);
    BufferedReader br = new BufferedReader(new InputStreamReader(in,"UTF-8"));
    CSVReader reader = new CSVReader(br,'\n');
    //CSVReader reader = new CSVReader(new FileReader("Downloads/ACTIVITY_LOG_22-JAN-13.csv"),'\n');
    List<String> list=new ArrayList();
    while ((nextLine = reader.readNext()) != null) {
    if(nextLine !=null){
    for(String s:nextLine){
    list.add(s);
    System.out.println("list size ; "+list.size());
    OutputStreamWriter w = new OutputStreamWriter(out, "UTF-8");
    CSVWriter writer = new CSVWriter(w, ',','\u0000');
    for(int i=0;i<list.size();i++){
    System.out.println("list items"+list.get(i));
    String[] entries = list.get(i).split(",");
    writer.writeNext(entries);
    //System.out.println("list items : "+list.get(i));
    writer.close();
    } catch (IOException e) {
    e.printStackTrace();
    say the filetoberead.CSV contains following data,
    0,22012013,E,E,ASG,,O-0000,O,0000,100
    1,111211,LI,0,TABO,B,M002500003593,,,К /БЭ60072715/,КАРТЕНБАЙ
    2,07,Balance Free,3
    1,383708,LI,0,BDSC,B,НЭ63041374,,,Т /НЭ63041374/,ОТГОНБААТАР
    2,07,Balance Free,161
    It reads and writes the numbers and english characters correct. All cirillic characters it prints "?" as follows,
    0,22012013,E,E,ASG,,O-0000,O,0000,100
    1,111211,LI,0,TABO,B,M002500003593,,,? /??60072715/,?????????
    2,07,Balance Free,3
    1,383708,LI,0,BDSC,B,??63041374,,,? /??63041374/,???????????
    2,07,Balance Free,161
    can somone please help me to resolve this problem?
    Regards !
    Sameera

    Are you sure that the input file (e.g. "Downloads/filetoberead.CSV") is in UTF-8 character set? You can also check it using some text editor having a view in hex mode. If each Cyrillic character in your input file occupies a single byte (instead of two), then the file is not in UTF-8. Most probably it is in Cyrillic for Windows (CP1251).
    If this is the case, you should modify the line
    BufferedReader br = new BufferedReader(new InputStreamReader(in,"UTF-8"));toBufferedReader br = new BufferedReader(new InputStreamReader(in,"windows-1251"));Dimitar

Maybe you are looking for

  • Can we assign more than one fieldgroup to a single event ?

    Hi, Can we assign more than one fieldgroup to an event ? I want pick few fields from each tab and show all those fields in my own tab is it possible to do so ? vishal

  • Configuring my internet/network settings for msn.

    MSN used to run flawlessly for me up until four or five days ago. Now it disconnects every 5-10 minutes, randomly decides to not send/receive messages in mid-conversation, and just generally ****** me off. Its error message of choice is "The system i

  • Non-Permitted posting period 013

    Hello Experts, When we try to load the data in BW after upgrade of ECC system we are getting the below issue. Non-Permitted posting period 013. Kindly help Thanks and Regards, Priya

  • Training and Events (Convention / Multi Session)

    Hi, Has anybody created a Convention type business event. I am trying t use this for a program that has multiple sessions (Session A, Session B etc). I tried to create a BE type with theflag for convention and then tried to create the Event date. But

  • Menüfehler in Photoshop CS2 nach Update 9.0.1

    Hallo! Als ich gestern in Photoshop über das Menü "Hilfe -> Updates..." mein Photoshop aktualisiert habe, spinnen die Menüs in Photoshop. Kleines Beispiel: Ich erstelle eine neue Datei. Dann nehme ich mir z.B. einen Pinsel und male auf dem leeren Bla