ADF way to download the file?

Hello

I have been searching the forum on how to implement the functionality of file download and I found three options.

1 manage the download of files yourself
<af:commandButton text="Normal Download" id="cb1"
     actionListener="#{testFileDownload.normalDownload}"/>
      
    public void normalDownload(ActionEvent actionEvent) {
        // Add event code here...
        ExternalContext ectx =
            FacesContext.getCurrentInstance().getExternalContext();
        HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
2. with the help of the fileDownloadActionListener
<af:commandButton text="FileDownload Listener" id="cb2">
     <af:fileDownloadActionListener method="#{testFileDownload.handleDownloadListener}"/>
</af:commandButton>

    public void handleDownloadListener(FacesContext facesContext,
                                       OutputStream outputStream) {
     }
Although in the docs, I saw a few notes on this tag.

NOTE: a limitation of the fileDownloadActionListener tag exists in Internet Explorer if the file name is multibyte, as Japanese characters. If the file name is multibyte and does not contain an extension of ascii (.txt or .doc), then the name of the file will not correctly appear in the download area of the file.

3 use a servlet to stream your file. (But I don't like this kind of things personally... I think!)

I can't understand and find a resource on what is the way of the ADF actually download the file?

I need assemble a file using Apache POI and IText to generate an Excel/PDF format.

Which method should I choose or is there something else?

JDEV 11G PS3

Published by: Neliel December 21, 2011 18:02

Have you checked Timo series to handle this
[url http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/] JDev11.1.2.1.0: Manipulation of images/files ADF (part 2)

Tags: Java

Similar Questions

  • Template file - y at - it an easy way to update the files related to a model, and download them (put) at the same time?

    First of all, I am a user of Adobe software for 20 years now.  I love the adobe range. I want to just clarify.

    Question... Template Files - y at - it an easy way to update the files related to a model, and download them (put) at the same time?

    Its been bothering me since I started using Dreamwever 10 years now, when you use template files to create small, who later turn wholesale websites. Whenever I update a template file I have to find each file in the files Panel, then download them. When I navigate through a lot of directories to find it can get a lot of time and boring.  Whey cant be just a button that does it? See the attached file.

    Is there a way to do this?  Any help would be appreciated.

    Thank you very much

    Andy

    Dreamweaver-Updated-Template-File.jpg

    The sync tool should do what you want (second "circular arrows" icon in the files window).

    Who checks your files against the files of the current server and download all that is changed. By default, is also download any file from the server which is more recent than your local files at the same time, but you can set it to 'Put the latest files remotely' rather than 'get and put newer files' and you should be good to go.

  • Error "C:\Documents and settings\user\mydownlaods\ &#60; download the file &#62; is not found" after downloading a file.

    Original title: download problems

    After that I downloaded a file, it is deleted when I try to open it. I get an error that says C:\Documents and settings\user\mydownlaods\than the name of download, cannot be found.when I look in my download file, it shows the download as being deleted. Any ideas?  FF

    Welcome back, checks and please uncheck all responses as answered, this way among the other contributors will see the question and perhaps a few other ideas.

    Thank you

    EDIT:

    other things that could cause this problem:

    1.

    IE open in "no Add-ons" mode To do than go to start > all programs > Accessories > system tools > "Internet Explorer (No Add-ons). If you can download the software now, it suggests then there's a bad addition affecting the browser.

    2.

    Sometimes the index.dat file may be damaged. In this case, you will need to delete the index.dat file and restart your computer. Then, you will be able to upload files properly again. Follow the steps below to delete this file.

    (1) open Internet Explorer.

    2) click on tools, click on Internet Options

    (3) on the tab general, under temporary Internet files, click on delete files

    4) click Ok when asked if you want to remove the files

    (5) by the historical section under the general tab, click clear history, and then click Ok

    (6) close Internet Explorer

    (7) logout the current user and log on to another user as administrator account

    (8) click on start, run

    (9) type CMD and press ENTER to open a command prompt

    (10) replace the directories in the Temporary Internet Files directory by typing the following command, substituting the word by the user username and the correct drive letter in Windows XP.

    CD drive: \Documents and Settings\nom of utilisateur\Local Settings\Temporary Internet Files\Content.IE5

    Example: cd c:\Documents and Settings\Mark\Local Settings\Temporary Internet Files\Content.IE5

    (11) type del index.dat and press enter

    (12) type Exit and press ENTER to close the command prompt

    (13) restart your computer

    Once the computer has been restarted, open a web page with a link to a download. Click on the link and try to download the file. It should work now.

    Written by Mark Hasting

    3. http://support.microsoft.com/kb/932823?ppud=4&wa=wsignin1.0

  • Open / download the file from the server db

    Hello guys!

    I have spent ages to find a way to open respectively to download a file from my db server.
    I use a stored procedure to write an xml file in a directory with an alias "DIR_EXCEL_EXPORT". (This directory is created in the database to reference the folder on the db server. The folder is/tmp).

    Can you please give me an example how to download the file created automatically once the file is created or at least how to open it manually using a button in the apex?

    I appreciate your efforts and your ideas on this topic.

    Best regards

    SEB

    Hello

    Make sure that your button attributes
    Target "Page of this Application.
    Page & APP_PAGE_ID.
    Defined for example application DOWNLOAD_XML

    Then check that your APA process is conditional on demand DOWNLOAD_XML

    Also, make sure that DAD user have read privilege to the directory that you are using

    Kind regards
    Jari

  • I have the UI which downloads the file in file multiprt transfer in chuncks. It worked very well in a previous version of firefox, but now ajax calls gets abandoned?

    I have the UI which downloads the file in file multiprt transfer in chuncks (blob file). It worked very well in a previous version of firefox when we send chuncks 10 MB for each ajax calls. But now in the last version of firefox, its get rejected for 10Mo chuncks with every call, but allowing only 4 KB be sent for each call. You guys could help me. I also tried with the Application (/ octectstream). It also works very well in all browsers.

    Hi Sivasathy, support.mozilla.org is intended for management of the end user. If you have questions about web development please refer to the place to go for support the developers instead. Thank you for your understanding!

  • I can't download the file in the browser

    I have a alcatel one touch 2040d, no download link in the browser does not download the file and
    How to upgrade firefox os1.3 2.0 in my phone

    I do not think that the OneTouch 2040d working Firefox OS; It would be best if you contacted Alcatel directly.

    I hope this helps you!

  • Why my windows phone says he can not download the file type when you try to install the firefox browser?

    I have no restrictions on the phone. I tried to be sure and use the features of security as... Safe search, cookie and other block. He repeated, however, unable to download the file type when I try and install one of the browsers to date. What is interesting to say the least. Because my browser already uses the version more up-to-date. I have internet explore using a nokia windows 8

    Hello, the mobile version of firefox is not available on the windows phone platform: Firefox work on my mobile?

    There was technical and legal obstacles in the app store initially that discouraged mozilla to start any developments in this direction. I do not know the current situation, but given that mozilla is now focusing its efforts on the creation of firefox os as a platform open source web-based, I doubt you'll see firefox on your windows phone device in the foreseeable future...

  • Select and download the file to the collapsed site works on firefox 31

    On a site using CKEditor and RoxyFileman file manager to download the files, I have always used the button 'Browse' to select a file in my computer, and then you press the Upload button and work done. Updated to Firefox and now when I press the button 31 transfer window "Select the file" remains on the screen and no download.
    Last night I had a report of another user in the same site for this problem. I used the version 30 and that he had upgraded to version 31...
    Checked and no problems with Windows 7 and Windows XP with IE 11, 36 Chrome and Firefox 30 and Linux Mint 17 with Firefox 30.
    On sites with the button 'Browse' classic, there is no problem.

    Problem solved with Firefox 32!
    Now, everything works again as before...

    Thank you Mozilla team!
    I am very happy to see that you take in mind our problems and that you always support our work.
    Thanks again!

  • Where can I find and download the file "Windiag.iso" for Windows XP Home Edition?

    Where can I find and download the file "Windiag.ISO" for Windows Xp home edition?  IT TURNS OUT THAT HE MUST FIRST DOWNLOAD AND RUN A FILE NAMED 'MTINST. "EXE", AND THAT IN DOING SO, THE FILE NAMED "WINDIAG. ISO"IS CREATED.

    Hello

    You can check this link:

    http://oca.Microsoft.com/en/windiag.asp

  • Problems loading a file in SkyDrive: "sorry, SkyDrive can't download files. Please download the files that are contained in the folder instead.

    Whenever I try to add a "xlsx" to "SkyDrive" document I get the following message:

    Sorry, SkyDrive can't download files. Please download the files that are contained in the folder instead. Neither I am able to drag and drop files in skydrive folder!

    I even tried as well to load it from the Office & do slip from the "Desktop" to the "SkyDrive" - but not of joy!

    Assistance would be greatly appreciated

    > Sorry, that SkyDrive impossible to download files. Please download the files that are contained in the folder instead.

    He tells you to OPEN the file, download the files on skydrive. BUR, NOT the FOLDER itself.

    You can download several files at the same time. How many? I'm not sure. I do not have more than 2 files both myself.

    SkyDrive limited maximum 50 MB each download.

  • Could someone tell me: How can I download the file "dumppo.exe" from the Microsoft website. Please write to me at: * e-mail address is removed from the privacy *; Thanks in advance.

    I want to download the file "dumppo.exe" from the Microsoft site, but I can't find where to download it!

    No longer seems to be available.

  • I lost my backup for windows xp home disks and now my computer asks me for the startup disk. Is there anywhere I can download the file on a dvd?

    Windows xp starts

    I lost my backup for windows xp home disks and now my computer asks me for the startup disk.  Is there anywhere I can download the file on a dvd?

    Hi DrKathy1950,

    ·         Did you do changes on the computer before the show?

    ·         When she asks the startup disk?

    ·         You get the error message?

    ·         Are you able to boot to the desktop?

    Answer with the information required to help more.

    For reference:

    How to replace Microsoft software or hardware, order service packs and replace product manuals

  • Download the file is missing. Not asked where I would like to save file, only the 'Save' button appears

    When you download a file, I ask me where to save the file.  He asked me just to save it or not.  Then, after you save the file, I try to find the file, but it is not in the usual directories when I download files.  I tried to download from CNET.  This just started today.  Don't remember any recent downloads either.
    That's happened? It is not under My Documents to my profile or my Local Settings\Temp directory either.  I did a search for the file name, even in hidden folders.
    I am running Windows XP Home Edition.  [By today standard T - Rex, but it's the only one I use for office work, no video editing work.]

    Hi WingersMedia,

    1. What web browser do you use to download the files?
    2. Are you having a similar problem with all files or any download specific file only?
    3. Are you able to download and save files from other sites?

    I suggest that you try to download other files on the same site and check if it works.

    I suggest you check that the recording location of the file when you are prompted to save the file and check later to this place.

    Also check out the link below to put on with similar problem and check if it is useful if you are using Internet explorer as your web browser.

    http://answers.Microsoft.com/en-us/IE/Forum/IE8-windows_other/IE-7ON-downloading-files-option-to-save-asopen/9ee22c03-8fc3-4225-9bde-ee0e8e3c0fe9

  • Windows media player has encountered a problem when downloading the file. for additional assistance, click web help.

    Original title: unable to audio stream.

    Unable to audio stream, "windows media player has encountered a problem when downloading the file.  for further assistance, click web help' web help does not work, clicking web help does nothing (no response from program... a lot of negative response from me) stuck with the big pass... vista 64 bit... a lemon from the getgo... problem after problem...

    Hi Joseph,

    What is the file format of the file you are trying to download?

    This problem normally occurs when the Media player could not play the file downloaded or not supported.

    Method 1:

    Step 1: Here is the list of the formats supported by Windows Media player file:

    Information on the types of media files that supports Windows Media Player:

    http://support.Microsoft.com/kb/316992

    Note: See if the file format is in this list, if it is not there, you may need a third-party codec that can read the file.

    Step 2: For more information about codecs, see article given:

    Codecs: Frequently asked questions:

    http://Windows.Microsoft.com/en-us/Windows-Vista/codecs-frequently-asked-questions

    Warning: using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Method 2:

    I also suggest you to run the Windows media player Fixit:

    Solve the problems of Windows Media Player video and other media or library

    http://support.Microsoft.com/mats/windows_media_player_diagnostic

    Hope this information helps.

  • I can't download the files Bank, brokerage, etc.

    I can't download files more for some reason, the Bank, brokerage or carbonite.  One got any ideas on why not and how to solve this problem?

    Hello

    1 did you receive an error message?

    2. don't you make changes to your computer?

    3. what web browser do you use to download the files?

    I suggest you to follow the links and check out them.

    Download files from the Internet: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/downloading-files-from-the-Internet-frequently-asked-questions

    Disable the anti-virus software

    http://Windows.Microsoft.com/en-us/Windows7/disable-antivirus-software

    Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

Maybe you are looking for