HTML content is shown in the downloaded attachment file when it is a .txt

Before deploying, in Jdeveloper, files can be downloaded for all filetypes (xls, ppt, doc, txt),
and all can be viewed correctly.
But after deploying (ct is on 11.5.10.2 RUP5), when we are on this xxxx.jsp page with
file download button links and we click on the download button, all files can be downloaded
and viewed correctly for filetypes (xls, ppt, doc) except for .txt files. .txt file can be
downloaded but when viewed, the text inside is appended with html contents after the original text.
eg. The original text in abc.txt is "test".
Then the file downloaded and opened will contain:
+"test+
+<!-- METADATA_SOURCE - JRAD --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01+
Transitional//EN"><html dir="ltr" lang="en-US-ORACLE9I"><head><title>Oracle
Applications</title>..."
Found a similar bug6313329 which has html contents appended to wf notification mail
and is fixed with patch 6313329 but since our customers issue is on OAF pages after delploying
on 11.5.10.2 ATG_PF.H RUP5 env, not sure whether this patch will work.
Anyone encountered such issue? Any advise is greatly appreciated.
Thanks.

I'm trying this to download files , txt file can be downloaded .
but , the text inside is appended with html contents after the original text .
try{
BlobDomain bdata = (BlobDomain)(vo.getCurrentRow().getAttribute("FileData"));
int chunk = bdata.getBufferSize();
DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
HttpServletResponse response = (HttpServletResponse)sessionDictionary. selectValue(null,"HttpServletResponse");
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
if((filename.substring(filename.lastIndexOf("."),filename.length())).equals(".txt")){
response.setContentType("application/x-txt; charset=Shift-JIS");
response.setHeader("Content-disposition","attachment; filename=\""+filename+"\"");
InputStream instream = bdata.getBinaryStream();
byte'[] buffer = new byte[chunk];
int length = -1;
while ((length = instream.read(buffer)) != -1) {
out.write(buffer,0,length);
instream.close();
out.flush();
} catch(Exception e1) {
e1.printStackTrace();
Please suggest. its urgent.
Thanks & Regards
Edited by: user10679811 on 2009/11/25 6:55
Edited by: user10679811 on 2009/11/25 6:56

Similar Messages

  • HTML content is shown in the downloaded attachment when it is a .txt file

    Before deploying in Jdev, files can be downloaded for all filetypes (xls, ppt, doc, txt),
    and all can be viewed correctly.
    But after deploying (ct is on 11.5.10.2 RUP5), all files can be downloaded and viewed correctly
    for filetypes (xls, ppt, doc). But for .txt files, it can be downloaded but when viewed,
    it is appended with html contents after the original text.
    eg. The original text in abc.txt is "test".
    Then the file downloaded and opened will contain:
    "+test+
    +<!-- METADATA_SOURCE - JRAD --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01+
    Transitional//EN"><html dir="ltr" lang="en-US-ORACLE9I"><head><title>Oracle
    Applications</title>..."
    Found a similar bug6313329 which has html contents appended to wf notification mail
    and is fixed with patch 6313329.
    Anyone encountered such issue? Any advise is greatly appreciated.
    Thanks.

    User,
    There is a specific forum for OA Framework - you should probably be asking there; when you do, you should probably provide a bit more information (e.g., are you talking about attachments on a workflow notification or something else).
    Best,
    John

  • 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

  • N8 can´t download attached files

    Hi everyone,
    I hope you can help me out. I have configured my 2 mail accounts (gmail and hotmail) on my new N8. I can properly read mails, but i can´t download most of the attached files to mails. I get an error  "error downloading attached file nameoffile  ".
    As i said, some files do download while others do not.
    Please, i need a hand as attached files are very important for my job.
    Thanks in advance.

    Hi you need to add the settings manually - no matter what you specify whilst you use the email set up wizard it will not download attachments unless you are within your home wlan
    and each time you try to re run the wizard it will always use the same settings
    I found the only way was to back up the phone using ovi suite
    then *#7370#
    onc eht ephone has reset you have to re enter the email info - when it asks you to accept the terms and conditions - say no
    you will now get the option to enter the settings manaully
    there are quite a few sub menus to navigate through but i f you are patient you will find them all
    if you find the one about down loading 50 mails limit - you can back space out the 50 and enter 999
    another menu alllows you to download attachments-- default is none lol
    another menu allows you to check for mails fromevery  2 minutes to 5 days
    once i had set up one account doing the others was easy and i get all my mail with attachements very nicely now
    regards
    Steve
    Steve 

  • I can't find a plug in that i downloaded and put in the library/audio file when I'm in garage band

    I can't find a plug in that i downloaded and put in the library/audio file when I'm in garage band?

    In GarageBand 10.0 and GarageBand '11 are the plugins (Audio Units) installed in
    /Library/Audio/Plug-Ins/Components/
    What is the GarageBand version? Not all plug-ins are compatible with the newest version GarageBand 10.0
    The version number is shown in the "About panel" in the main menu bar: GarageBand > About GarageBand
    If you are having the newest GarageBand 10.0, the Audio Units will show in the panel in the Smart Controls of the Track you selected.
    Scroll the "Info" pane down all the way or enlarge the Smart Controls pane by dragging the dividing line to the track area upward, until you see theAudio Unit Brick. 
    Most panes in GarageBand 10.0 can be scrolled.  If you do not see the scroll bars, they will appear automatically, when yous start scrolling. Or enable them permanently in the System Preferences > General > Scroll Bars. This is useful, as long as you do not know yet, which panes have hidden items that will need scrolling, to make them visible.
    The Smart Controls need to be enabled in GarageBand Preferences >Audio Midi.
    Some Audio Unit plug-ins will no longer work, since the new GarageBand 10.0 is a 64-bit only application; the 32-bit plug-ins are incompatible.
    See this document:  GarageBand for Mac (v10.0): Unexpected behavior with Audio Units plug-ins

  • Can I set up e-mail to automatically download attached files from a trusted source

    can I set up e-mail to automatically download attached files from a trusted source to a desktop folder?  Can't find the option (if one exists) in "Rules."

    Have you checked Mail > Preferences > General > Downloads folder - change that to desktop. That should do it (that is my setting and it works here).

  • How to add a SPACE as suffix to the last field in the downloaded text file?

    Hi Experts,
    By using GUI_DOWNLOAD am saving the data(only 3 fields) in a text file on my desk top.
    fine.
    example current record1 : 010001                      354.999            26.000
    here, after 3rd field 26.000, immediately the cursor is jumping to next line in text file.
    but, wanna a SINGLE SPACE after 26.000, say 26.000+space.
    tried with CONCATENATE, OFFSETTING, but no use(may b am using incorrectly)
    so, pls. suggect me, How to add a SPACE as suffix to the last field in the downloaded text file?
    thanq

    Sorry...Typo error...Too many in the last few days -:(
    Wanted to say AFTER -:)
    Do it like this...
    FIELD1 TYPE XXX,
    FIELD2 TYPE XXX,
    FIELD3 TYPE XXX,
    SPACE(1) TYPE C,
    That way you should end with...
    26.000+SPACE
    Greetings,
    Blag.

  • The Downloaded PDF file does not contain the Signature through BSP pages

    HI,
    We have an requirement for Distributing the FORM 16 to all Employee's through our Website, where the user will login and download his own FORM 16 ( TDS Certificate)
    This FORM 16 ( TDS Certificate ) is generated in SAP ( ECC 6.0 ) in Payroll Module.
    To satisfy the above requirement we have done the following steps.
    1) First we have modified the standards SAP Sapscript(Layout) to incorporate the Signature of Authorised Payroll Person. 
    We have done this by uploading the BMP file ( though t-code SE78 ) and then calling this file in the Standards layout which prints the FORM 16 document.
    2) WE also Modifed the Dirver program to Download the above document in a .PDF  file. 
    The Program creates the seperate file for each employee and assigns the employee number as a file name to each downloaded file. These all files are downloaded on a Users Machine.
    We opened the Downloaded .PDF files, and checked for the Signatures. The Signature were comming perfect as it ws uploaded.
    3) We uploaded these all FORM 16 PDF file off all emlpoyee's to a different SERVER ( BW 7.0 ). With the help of BASIS person, using the FTP utility.
    4) We wrote a BSP program to download this ulploaded PDF Files.
    BUT we are facing a PROBLEM in the DOWNLOADED PDF file.
    The Downloaded file does not contain the Signature which is there is the Original file we uploded this server.
    All other data in the dowloaded PDF file is Perfect other than the Signature.
    When we open the downlaoded PDF file it give's following  message on the Signautre page.
    " Xobject not found named 00013"
    The number of the Object comes different to different files.
    We are using Function module 'SCMS_STRING_TO_XSTRING' to Convert string to Xstring
    We are using the the " CALL METHOD CL_BSP_UTILITY=>DOWNLOAD" for downloading the PDF file.
    Please suggest some solution if you can
    Thanks in advnace.
    Re
    GAGAN

    HI,
    We have an requirement for Distributing the FORM 16 to all Employee's through our Website, where the user will login and download his own FORM 16 ( TDS Certificate)
    This FORM 16 ( TDS Certificate ) is generated in SAP ( ECC 6.0 ) in Payroll Module.
    To satisfy the above requirement we have done the following steps.
    1) First we have modified the standards SAP Sapscript(Layout) to incorporate the Signature of Authorised Payroll Person. 
    We have done this by uploading the BMP file ( though t-code SE78 ) and then calling this file in the Standards layout which prints the FORM 16 document.
    2) WE also Modifed the Dirver program to Download the above document in a .PDF  file. 
    The Program creates the seperate file for each employee and assigns the employee number as a file name to each downloaded file. These all files are downloaded on a Users Machine.
    We opened the Downloaded .PDF files, and checked for the Signatures. The Signature were comming perfect as it ws uploaded.
    3) We uploaded these all FORM 16 PDF file off all emlpoyee's to a different SERVER ( BW 7.0 ). With the help of BASIS person, using the FTP utility.
    4) We wrote a BSP program to download this ulploaded PDF Files.
    BUT we are facing a PROBLEM in the DOWNLOADED PDF file.
    The Downloaded file does not contain the Signature which is there is the Original file we uploded this server.
    All other data in the dowloaded PDF file is Perfect other than the Signature.
    When we open the downlaoded PDF file it give's following  message on the Signautre page.
    " Xobject not found named 00013"
    The number of the Object comes different to different files.
    We are using Function module 'SCMS_STRING_TO_XSTRING' to Convert string to Xstring
    We are using the the " CALL METHOD CL_BSP_UTILITY=>DOWNLOAD" for downloading the PDF file.
    Please suggest some solution if you can
    Thanks in advnace.
    Re
    GAGAN

  • 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.

  • Downloading attachment file

    Downloading attachment file on my Nokia Lumia 1520 is not possible...can someone help me please...thank you.

    In order to troubleshoot, it would help to know what happens when you try, and also what kind of file you are trying to access.
    Note that files attached to e-mails may cause problems if they are not recognised file types.

  • 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

  • Can the form attachment files be included in the notification e-mail?

    Can the form attachment files be included in the notification e-mail?
    Best regards

    Hi,
    Currently the attachment cannot be sent with email notifications in FormsCentral. You may submit feature request via http://forums.adobe.com/docs/DOC-4233.
    Thanks,
    Wenlan

  • HT1657 If I download a movie today, but will not be watching it for a few weeks (i.e. when overseas) - when does the 'activation' period start?  Do I have 48 hours from the download date or when I first watch the movie?

    If I download a movie today, but will not be watching it for a few weeks (i.e. when overseas) - when does the 'activation' period start?  Do I have 48 hours from the download date or when I first watch the movie?

    You have 30 days from when you download it, but when you then start watching it you have 48 hours (24 if your account is US based) to finish watching it before it expires.

  • Im facing problem while trying to update my iphone 4 from version 4.3.1 to iOS 5. While processing the downloaded 774mb file, it comes with the statement that the network connection timed out. why???

    im facing problem while trying to update my iphone 4 from version 4.3.1 to iOS 5. While processing the downloaded 774mb file, it comes with the statement that the network connection timed out. why???

    i have been dealing with this same issue, tried to  turn off firewall and even turn of antivirud but still it gave me the same error.

  • I made un update for OSX-10.9.2. , and when a scan a document or a picture, and order `save as` , the file saved is a black picture or document. I can't see the file. What happens? I made the downloads of files required in HP site.  Tks, Paulo

    I made un update for OSX-10.9.2. , and when a scan a document or a picture in one printer HP D-110, and order `save as` , the file saved is a black picture or document. I can't see the file. What happens? I made the downloads of files required by HP for the OS maverick in HP site. 
    Tks, Paula

    This link should help:
    http://h30434.www3.hp.com/t5/Mac-Printing-and-Scanning/OS-X-10-9-Mavericks-Incor rect-output-using-HP-Scan/td-p/3069079

Maybe you are looking for