How can i download file from a pageflow portlet in Webloigc Portal?

How can i download file from a portlet in Webloigc Portal?
My Question is, when i download files used codes in a pageflow listed below,
it didn't work. but in non-portal environments, it worked well.
How can I download a file from a portlets in portal??
Thx in advanced.
this.getResponse().setContentType ( "application/ms-excel" ) ;
this.getResponse().setHeader ( "Content-Disposition" ,"attachment;filename="
+new String("Excel.xls".getBytes(),"iso-8859-1")) ;
sth.write(this.getResponse().getOutputStream());

i always use an old fashioned method when i have to do this, i create a new jsp that contains a scriptlet that writes to the ServletOutputStream.
<i>outputWriter.jsp</i>
// define your own class to get file here, otherwiser use netui-data:callControl tag
<code><pre>
File file = FileControl.getFile(fileName);
String fileName = (String) request.getParameter("fileName");
response.setContentType(file.getContentType());
ServletOutputStream sos = response.getOutputStream();
InputStream is = file.getInputStream();
for(int i = 0; (i = is.read()) != -1;)
sos.write(i);
sos.close();
</pre>
</code>
i then call this jsp from the jsp to which i forward in my action using a simple url rewrite with file name on the url.
<a href=outputWriter.jsp?fileName=nameOfFileToDownload                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How can I download file from my net book

    How can I download file from my notebook

    You can use 3rd party Apps in conjunction with File Sharing in iTune to add files to your iPad.
    http://i1224.photobucket.com/albums/ee374/Diavonex/fb272a97.jpg
    http://i1224.photobucket.com/albums/ee374/Diavonex/a58417cc.jpg
    http://i1224.photobucket.com/albums/ee374/Diavonex/a98c6a7e.jpg

  • How can I download files from my PC to my new I-Pad? Mainly PDF files. The manual doesn't make sense to me...

    I have read the manual on how to transfer a file from a computer to my I-Pad. It says in I-Tunes, go to devices Apps pane...
    I open the I-Tunes App and can not find anything referencing an Apps pane.
    What am I missing?

    You connect your device to your comptuer and open iTunes. Once it 'sees' the ipad, you can click on the name of your device and then you should see the tabs. In the Apps tab is your interface to remove apps, also to use the file transfer protocol - if your app supports that - to move files from your computer to your iPad. You can also use this interface to move the app icons from menu page to menu page on your device.
    First, to use that apps tab, you'll need an app that'll read PDF files.
    The file structure on an iPad is different than that from a computer or Mac. There is no general 'overall' file manager. Every file on your iPad needs to be associated with an app. So to read PDF files, you'll first need to install an app. iBooks will read PDF files. as will ReaddleDocs. I also see goodreader recommended a lot. So just search for PDF reader and find one that looks good to you.
    Install the app. After the app is installed, you can go to the apps tab and move files onto your device.

  • How can i download files from icloud to iPhone

    i have completed icloud set up in my pc & iPhone 6 plus and stored some files on the icloud, but I can not pulls out files from icloud on my iphone.

    According to what I know the only way to see or use those files on iphones and ipads is by using compatible app, that can read those files.

  • Can't download file from any browser and download manager

    i confused wit my MBP, becaus MBP can't download file from internet ( via USB modem & Wi-fi)..
    can you help me to fix it ??
    i use iGetter, and it not responding to download, safari too..

    I was able to download the trial from rarlab.com. What happens when you click on a download? You need to make sure you select to download the Mac version. The .exe files do not run on a Mac.
    BTW, you might want to check out GUI Tar  https://www.macupdate.com/app/mac/14503/gui-tar
    The other two sites also work for me. What exactly happens when you click on a link to download? Do you know how to find your downloads?
    How to download YouTube videos using Safari or Firefox
    6 Different Ways to Download Videos from YouTube to your Mac

  • How to move downloaded files from download folder to other relevant folder or how to download files in relevant folders other than download folder

    how to move downloaded files from download folder to other relevant folder or how to download files in relevant folders other than download folder

    Just drag the file from the Download folder to the folder of your choice in Finder. If you are using Safari you can designate a new default download destination in Safari>Preferences>General tab, 'Save Downloads to...'. Other browsers should have a similar option in their preferences.

  • How can i download voicemail from my iphone to my computer

    How can i download voicemails from my iphone 5 to computer

    The sync is one way - computer to ipod.  The exception is itunes purchases:  File>Transfer Purchases
    It has always been very basic to always maintain a backup copy of your computer for this very occasion. Have you failed to do this?

  • How can I download images from website with Automator?

    Hi!
    I want to ask how can I download images from website with Automator like here http://www.youtube.com/watch?v=hQm7Xr9jY0w&t=85m15s (in 1:25:15).
    I want to download these images to my downloads folder. Some things have changed and I can't find exact options as then. When I am trying to make it it shows "The action "Download URLs" was not supplied with the required data."
    I am using 2012 late iMac with Mac OSX 9.2 (Mavericks).

    There are two apps that I know of - and I would also swear that they come from the same developer, although they've different names. Both have free trials and both cost $40 (but both do 'other' video conversion as well).
    One is WonderShare - I bought this one and it works very well for downloading YouTube videos as well as converting just about any file format you can think of.
    The other is iSkysoft Video Converter (just noticed that it's now $36).
    I tried them both and finally decided on WonderShare. Give them both a trial run and decide if you like either one enough to buy it. I don't know of any 'free' software that will allow you to download and convert YouTube videos, but perhaps someone else will come along and know of something...
    Good luck,
    Clinton

  • How can i download keynotes from my iMac to my macbook air

    how can i download keynotes from my iMac to my macbook air

    Do you mean the application Keynote or projects you have already created in Keynote on the iMac?
    If it's the latter just copy the files across the network to the Air. If it's the application itself and you bought it from the Mac App Store you can legally install it on any computer registered to you (I think there is a limit, but I'm not sure how many it is). Just log on to the Mac App Store from the MacAir and download it again - you won't be charged a second time.
    Edit: Just realised you may mean keynotes of various Apple events - if so, ignore me . If this is what you want, have a look here: http://www.apple.com/apple-events/

  • How can I download videos from youtube with may MacBook Pro? I cannot download with real player. So how can I do it?

    How can I download videos from youtube with may MacBook Pro? I cannot download with real player. So how can I do it?

    There are two apps that I know of - and I would also swear that they come from the same developer, although they've different names. Both have free trials and both cost $40 (but both do 'other' video conversion as well).
    One is WonderShare - I bought this one and it works very well for downloading YouTube videos as well as converting just about any file format you can think of.
    The other is iSkysoft Video Converter (just noticed that it's now $36).
    I tried them both and finally decided on WonderShare. Give them both a trial run and decide if you like either one enough to buy it. I don't know of any 'free' software that will allow you to download and convert YouTube videos, but perhaps someone else will come along and know of something...
    Good luck,
    Clinton

  • How can automatic save file from apex to user local directory?

    how can save pdf file from apex to user local directory on button click?

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "940509".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    how can save pdf file from apex to user local directory on button click?As Tony points out the ability to do so would represent a major security breach. The normal approach is to present the user with a download link that when clicked prompts them with a Save dialog in which they can select a location for the downloaded file.
    What is the source of the PDF file?

  • How can i store files from a PC on time capsule

    How can i store files from a PC on Time Capsule

    Actually although the format on the TC is not NTFS but Mac HFS+, that is irrelevant as far as windows is concerned. The TC offers SMB protocol to the network.. so how the TC stores the files is totally irrelevant.
    1. TC is by nature not particularly SMB happy..
    Change all names, TC and wireless to SMB compatible. Short, no spaces, pure alphanumeric.
    Turn on the guest account to read write access.. assuming you don't have security issues.
    Set the workgroup correctly.. don't use wins server.. no body does nowadays.
    Note short no space names.. guest access and workgroup all set.
    2. Download and install airport utility for windows or just bonjour for windows.. bonjour should be included with the full uitlity but that is not necessary.
    3. Just doing the above when bonjour loads it should bring up TC as accessible.. if not, or you need to access it manually.. open windows explorer and type in the address bar.
    \\TCName or \\TCIPaddress .. obviously replacing the generic name with the actual one used. In my case. as per the above screen shot. \\TCGen3
    You will then see the main root directory of the TC.. data or whatever it is named..
    Create a new directory under the root directory for your windows files.. and copy them there.
    Note .. some issues can arise if you are using the TC for TM backups.. Please keep a large enough amount of free space available that TM still works.. pondini recommends using disk images.
    http://pondini.org/TM/TCQ3.html
    As long as you still have plenty of free space this is not an issue but TM may have issues when it fills the drive as it is designed to do.

  • How do I download files from a digital recorder?

    How do I download files from a digital recorder?  I downloaded the software from Olympus online, but can't figure out how to bring it all together.

    It will probably help if you post the model number of the recorder so people know exactly what you're working with. Otherwise it's difficult to guess what might be of help.
    Regards.

  • How can i open file from adobe reader..i already have adobe read

    how can i open file from adobe reader..i already have adobe reader installed and cannot open a
    file and i cannot convert my file into pdf..

    Is the file really a PDF? Where is it? Have you tried opening it from within Reader?

  • Where can I find the Start up disk and how can I delete file from it.

    where can I find the Start up disk on theMac Book Air?
    How can I delete files from it?

    The startup disk is the internal SSD in your MBA.  You may delete files by draging the file  to Trash (or clicking on them and then execute COMMAND+Delete).  Then empty Trash.
    Ciao.

Maybe you are looking for