Open File from Filesystem with OutputLink

I have implemented an UploadForm with JSF. With this form a File is uploaded to my filesystem and some data (link to filename, filename itself and so on) are written to the Database.
No I display these data from the database in a datatable and I want to implement a link, that the user can open the file from the filesystem. I have tried a outputlink with something like that:
<h:outputLink value="file:C:\Entwicklung\IDE\eclipse\readme.txt" target="_blank">
               <f:verbatim>
                    Test
               </f:verbatim>
</h:outputLink>
I'm not sure if the file: Command is the right...
The problem is, that nothing happens. When I try to save the file, pressing the right button and choose "Save as..." the file is correctly saved.
How can I implement a link to open a file from the filesystem?
Regards,
Andy

No the file won't be a html file..
I will be some kind of pdf or doc?
So how to launch them? Do I need an Outputstream?
Has anyone experiences with that?Any file could go as an href value.
Issue is not file type, but a proper URI that the server could resolve.

Similar Messages

  • Open file from table with double click

    Hi all,
    I use adf faces and JDEV 11.
    I want to open a file by double clicking on row in a table. (file is stored in the database).
    I first tried it with a button to open the file, with this code:
           System.out.println("Double click!");       
           BindingContainer bindings = this.getBindings();
            DCIteratorBinding iter = (DCIteratorBinding)bindings.get("XxahelpBezoekRapDocView1Iterator");
            Row row = iter.getCurrentRow();
            FacesContext fc = FacesContext.getCurrentInstance(); 
            HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
            response.setHeader("Content-Disposition","attachment; filename=\""+row.getAttribute("Filename").toString()+"\"");
            response.setHeader("cache-control", "no-cache");
            try {
                InputStream in;
                in = ((BlobDomain)row.getAttribute("Bijlage")).getInputStream();
                ServletOutputStream out = response.getOutputStream();
                writeInputStreamToOutputStream(in, out);
                fc.responseComplete();     
            } catch (IOException e) {
                e.printStackTrace();
            } This is working fine.
    Now I wan't to open the file with double clicking on a row.
    For opening the file I use the same code in the backing bean and this code on the page:
          <f:facet name="metaContainer">
        <af:group>
            <trh:script>
               goEditRow = function(event) {
                    AdfCustomEvent.queue( event.getSource(), "doubleClickOnRow", {}, false);
            </trh:script>
        </af:group>
        </f:facet>And a clientListener and serverListener on the table:
    <af:clientListener method="goEditRow" type="dblClick"/>
    <af:serverListener type="doubleClickOnRow" method="#{backingBeanScope.backing_pages_EditTicket.doubleClick}"/>The only thing that happens when I double click is that I see "Double click!" in the console. But I can't save the file :S
    What is the problem?
    Thanks in advance.

    Hi
    What we do is to pick a table column for downloading the file.
    We change the component in the column to the an af:commandLink and add an
    af:fileDownLoadActionListener to the command link.
    The user clicks on the link to download (open) the file.
    Its not exactly the same as what you requested (double
    click on the row) but it might be another solution.
    Regards
    Paul

  • Opening files from WebUI

    Is it possible to forse IE to open files from IFS with asociated program out of IE window?
    If I choose to open .xls file it should open in Excel and not inside IE window.

    I looked in IE 5.5 & IE 5.0(on Win2000) and there is no 'Launch browser windows in a separate process' option nor any other similar option under 'Internet options'.
    Any ideas why?
    in IE 5.0 (Win 98) I found that option but it doesn't work - files are still opening in IE window.
    null

  • Problem with 9.3 Reader when opening files from internet

    I keep receiving the message 'There is a problem with Adobe/Acrobat Reader.  Please exit Adobe Acrobat/Reader and try again' when trying to open come files on the internet.  I am able to open files from my hard drive and some files from the internet.  I have uninstalled and re-installed Reader, but get same result.  Any ideas?

    As I posted on Feb. 19 this is what works for me.  OS is Windows 7 64-bit, AdoveReader 9.3.1., IE8.
    Open Adobe Reader,
                go to edit menu,
                under Preferences
                go to Internet, uncheck "Display pdf in browser"
    The pdf files then open, but not in the browser
    or if you have Google tool bar installed:
    On the Google tool bar
                            click on the options icon (a wrench)
                            go to Tools
                            scroll down to the bottom
                            uncheck Translate
    Or uninstall the Google tool bar.
    Pdf files open without a problem in Firefox.
    All of these solutions are easy.
    Good luck,
    Too Green

  • PSCS6 no longer recognizes my CR2 files and will not open. Using Canon 5DMark III with updated Camera Raw . It has worked before but now won't open files from this camera.

    I have been able to open files from this camera before but still checked for latest Camera Raw download. Still won't open files from this camera. Opens files from my 60D just fine. I downloaded the latest and it has worked before. What the heck is going on?

    Glad to be of help. But I'm curious (not critical of what you are doing) to know why so many people like to use Nikon Transfer to transfer their files to the computer. It is still necessary to import them into Lightroom. And, from my perspective, it seems simpler and maybe even a little quicker to use the Lightroom import dialog. I have Nikon cameras, and have never even installed the Nikon Transfer utility. What is so unique about it?

  • Problems with opening files from older iMacs on my iMac6, 1

    I can't open files from my older iMac Power PC G3 on my iMac6, 1. I keep getting the error message "file is used by Mac OS X and cannot be opened." The file types that won't open are .psd, .doc, and even some .pdfs. I was trying to transfer info from my old computer via flash/jump drive and nothings seems to work. PLEASE HELP!

    I can't open files from my older iMac Power PC G3 on my iMac6, 1. I keep getting the error message "file is used by Mac OS X and cannot be opened." The file types that won't open are .psd, .doc, and even some .pdfs. I was trying to transfer info from my old computer via flash/jump drive and nothings seems to work. PLEASE HELP!

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Hi, I just downloaded and installed Photoshop cc and the Camera Raw version is not the latest one available,so now I can no longer open files from my Nikon D750!  Can I update ACR?

    I just downloaded and installed Photoshop cc and the Camera Raw version is not the latest one available,so now I can no longer open files from my Nikon D750!  Can I update ACR?
    I have been using the new version of ACR with PS6 and have been able to open the D750 files,now I'm stuck.
    Thanks,
    Greg E

    You were probably using the Release Candidate version of camera raw 8.7, which one gets from Adobe Labs.
    http://labs.adobe.com/technologies/cameraraw8-7-cc/index.html

  • Can't open files from Bridge in CS6

    All was good with CS6 until today - it will not open files from Bridge. Jpg and RAW, neither will open, it's driving me bananas! Any suggestions?
    Edit: Problem solved. I had overlooked an old version of PS 7.0 was still in my program files and CS6 Bridge had picked it up as default editor. Deleted PS 7.0 and everything is back to normal. Phew!

    Lots of questions here, will see what I can add.
    For the file problem go to preferences/file type associations.  You should have the option selected CS6 for the extenstion as the default.  Might try the radio button on the bottom first to set them to default settings.
    If the 1.77g file you are refering to is the one you downloaded and used for installation you can delete it.  It is a wise choice to save it to a DVD first so in case you need it in the future you will have it.  Also save the serial number in safe place.  Acutally safe is not the right word, need to save in place where you can find it if you need it next year.  HD can fail.
    There are still thrid party plug-ins that do not work in 64 bit mode, hence the 32 bit version.  Also there is no 64 bit TWAIN so some still like to use that for scanning.
    Some users experience file association and other problems with an uninstall of past versions.  So it is safest to leave them be.
    If you want to clean up a little resist the urge to move any Adobe programs once is is installed.  Can really foul it up.

  • Windows client - error opening file from OS X Server

    We discovered, that some files cannot be read from windows applications via the server - Xserve 10.4.8 Server.
    When we try to open files from applications (open dialog, or double click ) via the server, the apps stop reading with errors. These errors occour not with all files!
    A copy of these files to the local Win-machines of course can be read.
    But, using a normal Win XP machine as a "server" will work fine.
    We use the latest Xserve and Software and Win XP-64 Clients with a 1000BaseT Network.
    Is there a samba issue, or can we modify some settings?
    This is really frustrating, because this was the reason why we bought the Xsever.
    Can anyone help me?
    Regards Markus

    The only thing I can offer you is a "me too".
    I have the same issue, but it only appears in some applications. My guess is that the method the application uses to open files makes the problem appear; other applications the users are using do not have this issue.

  • DW CS3 no longer opens files from SourceSafe

    Dreamweaver CS3 no longer opens files from Visual SourcesSafe
    2005 when you right-click and choose to View with DW, even if DW is
    the registered application.
    DW receives the focus, but nothing happens.
    This used to function with DW 8. I have tried it on two
    machines, both of which were fresh installs, so could not be
    conflicting with DW 8 in anyway.
    Is this a known bug?
    Matt

    It seems this is a known issue with Dreamweaver. I was able to access the files just fine by deselecting "display external links" in the view menu. Strange that I did not have to do this before.
    For anyone interested, here are some links about this: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=18 9&threadid=1262486&highlight_key=y&keyword1=design%20mode and http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401608&sliceId=1

  • Word, PowerPoint and Excel Crash when opening Files from Sharepoint Site.

    Hello,
    I am in the process of rolling out office 2013 company wide. I have started with a batch of test users and a few including myself are reporting various office apps crashing with opening files from our SharePoint site. Although at times it will crash outside
    of the site. 
    I have tired running each app in various modes (Safe-mode, Compatibility mode ect) but the same results keep happening. Although it does not happen all the time on other users machines its more frequent. If i download the file and open it locally this does
    not appear to happen. 
    We are all running Office 2013 SP1 32bit on Windows 7 Machines. 
    One Common issue they everybody seems to have always points to "Faulting module path: C:\Windows\system32\VBScript.dll". I have done some digging but have not encountered any solution that points to this file. We constantly stay current on the
    latest updates from MS.
    Any suggestions would be very helpful.  
    Faulting application name: POWERPNT.EXE, version: 15.0.4701.1001, time stamp: 0x54e30979
    Faulting module name: VBScript.dll, version: 5.8.9200.17267, time stamp: 0x54e80d2c
    Exception code: 0xc0000005
    Fault offset: 0x00004b18
    Faulting process id: 0x235c
    Faulting application start time: 0x01d05cfec4e68efd
    Faulting application path: C:\PROGRA~2\MICROS~2\Office15\POWERPNT.EXE
    Faulting module path: C:\Windows\system32\VBScript.dll
    Report Id: 06a26b9a-c8f2-11e4-82f5-f01faf3ff4e9 
    Faulting application name: EXCEL.EXE, version: 15.0.4693.1000, time stamp: 0x54b5cf28
    Faulting module name: VBScript.dll, version: 5.8.9200.17229, time stamp: 0x54b494b6
    Exception code: 0xc0000005
    Fault offset: 0x00004b18
    Faulting process id: 0x10c0
    Faulting application start time: 0x01d0591c4e4be9d4
    Faulting application path: C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE
    Faulting module path: C:\Windows\system32\VBScript.dll
    Report Id: 991c342e-c50f-11e4-bb22-f01faf3ff4e9
    Faulting application name: WINWORD.EXE, version: 15.0.4693.1000, time stamp: 0x54b5d322
    Faulting module name: VBScript.dll, version: 5.8.9200.17229, time stamp: 0x54b494b6
    Exception code: 0xc0000005
    Fault offset: 0x00004b18
    Faulting process id: 0x18ac
    Faulting application start time: 0x01d058110aaeea68
    Faulting application path: C:\Program Files (x86)\Microsoft Office\Office15\WINWORD.EXE
    Faulting module path: C:\Windows\system32\VBScript.dll
    Report Id: 49c2fed2-c404-11e4-adfe-f01faf3ff4e9
    In some instances even outlook will crash as well although I think this is unrelated to sharepoint. 
    Faulting application name: OUTLOOK.EXE, version: 15.0.4693.1000, time stamp: 0x54b5d37b
    Faulting module name: VBScript.dll, version: 5.8.9200.17229, time stamp: 0x54b494b6
    Exception code: 0xc0000005
    Fault offset: 0x00004b18
    Faulting process id: 0x113c
    Faulting application start time: 0x01d05911e9f9cde2
    Faulting application path: C:\Program Files (x86)\Microsoft Office\Office15\OUTLOOK.EXE
    Faulting module path: C:\Windows\system32\VBScript.dll
    Report Id: bb795581-c508-11e4-bb22-f01faf3ff4e9

    Bump - Wondering if anybody has seen this before?

  • How can I check the open-mode of an opened file from the file refNum?

    How can I check the open-mode of an opened file from the file refNum?
    Especially whether a file is opened as read-only or write-only? I haven't found any VI in the panel with file VIs.
    Thanks for any hints!

    Check this post. Probably you can use a kernel.dll call.
    http://forums.ni.com/t5/LabVIEW/file-date-created/m-p/109836

  • Photoshop CS3 lauches but does not open files from Lightroom 2.7

    These programs have been on my computer since the dawn of time and have always worked. Now all of a sudden I can't open files from LR into PS. PS launches, but the files don't open. I get that message Photoshop could not be lauched, which is ironic since the program is now open.
    I haven't done anything to the programs so it makes no sense. IN the past I have had issues with PS and the tech had me create a new login on my computer and it fixed things. Tried that. No help.
    Does anyone ahve any suggestions. I have repaired both programs to no avail.
    Thanks for you help.

    Something has gone wrong with how Lightroom finds and communicates with Photoshop.
    That could be a registry string, or some preference within Lightroom.
    The Lightroom forum is more likely to be able to help you solve this.

  • Open files from terminal (gnome-open doesn't work properly)

    How can I open files from terminal? On Ubuntu, I used xdg-open. On Arch, I have gnome-open, but I can only open directories with that, not files directly. This sucks bucause I like navigating through my files using the terminal instead of a file manager, which doesn't make that much sense if files can't be opened directly.
    Last edited by cryptkeeper (2012-01-10 14:36:42)

    If you want to see the syntax, here is my defaults.list (so far my Xfce installation hasn't tried to switch over to mimeapps.list):
    [Default Applications]
    audio/x-wav=audacity-usercreated.desktop
    application/x-shockwave-flash=swfdec-player-usercreated.desktop
    application/x-java-jnlp-file=java-web-start-usercreated.desktop
    audio/mpeg=audacity-usercreated.desktop
    application/x-bittorrent=deluge-usercreated.desktop
    application/javascript=medit-usercreated.desktop
    application/rdf+xml=medit-usercreated.desktop
    application/zip=xarchiver-usercreated.desktop
    application/x-compressed-tar=xarchiver-usercreated.desktop
    video/mp4=mplayer-usercreated.desktop;xine-usercreated.desktop
    text/x-agr=gracegtk-usercreated.desktop;grace-usercreated.desktop
    text/html=medit-usercreated.desktop;chromium-usercreated.desktop;firefox-usercreated.desktop
    image/x-xbitmap=mirage-usercreated.desktop;gimp-usercreated.desktop;medit-usercreated.desktop
    application/postscript=evince-usercreated.desktop
    application/x-cbr=evince-usercreated.desktop
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=gnumeric-usercreated.desktop;xarchiver-usercreated.desktop
    text/plain=medit-usercreated.desktop
    audio/flac=audacity-usercreated.desktop
    video/x-msvideo=mplayer-usercreated.desktop;xine-usercreated.desktop
    application/x-cbz=evince-usercreated.desktop
    image/gif=mirage-usercreated.desktop;gimp-usercreated.desktop
    application/vnd.ms-powerpoint=impress-usercreated.desktop
    application/x-java-archive=xarchiver-usercreated.desktop
    application/smil=kino-usercreated.desktop
    application/vnd.oasis.opendocument.text=writer-usercreated.desktop
    image/svg+xml=inkscape-usercreated.desktop;medit-usercreated.desktop;mirage-usercreated.desktop
    video/x-flv=mplayer-usercreated.desktop
    application/vnd.ms-excel=gnumeric-usercreated.desktop
    application/vnd.openxmlformats-officedocument.wordprocessingml.document=writer-usercreated.desktop
    application/vnd.oasis.opendocument.spreadsheet=calc-usercreated.desktop
    application/x-gnumeric=gnumeric-usercreated.desktop
    image/png=mirage-usercreated.desktop;gimp-usercreated.desktop
    application/x-audacity-project=audacity-usercreated.desktop
    video/x-ms-wmv=mplayer-usercreated.desktop;xine-usercreated.desktop
    image/jpeg=mirage-usercreated.desktop;gimp-usercreated.desktop
    image/bmp=mirage-usercreated.desktop;gimp-usercreated.desktop
    application/msword=writer-usercreated.desktop;abiword-usercreated.desktop
    video/mpeg=mplayer-usercreated.desktop;xine-usercreated.desktop
    image/x-eps=evince-usercreated.desktop
    application/pdf=epdfview-usercreated.desktop;evince-usercreated.desktop
    application/vnd.oasis.opendocument.presentation=impress-usercreated.desktop
    Obviously you probably have different app preferences than me. And you'll probably have to sed away the "-usercreated" strings because I am anal about having my own desktop file for everything.

Maybe you are looking for

  • CSS being crazy...

    Hello. I created the following site, which looks exactly how it should in IE (tried two different versions): http://www.troma.com/IFTA/index.php In Firefox and Safari, however, it looks totally wrong (and looks the same in both of those browsers). Th

  • IMovie editing slow while MBP connected to Plasma Screen

    Am newbie to MBP and iMovie I am using the MBP connected to the 42 inch Plasma screen. I am getting frequent and prolonged spinning ball while editing in iMovie. The raw DV footage is stored on Glyph EHD connected to MBP by FireWire 800 cable. Is the

  • I can't fix the slowness of my thunderbird email.

    I had been using thunderbird email on my pc with windows 8, my computer recently crashed and was unable to fix. I had to purchase a new computer which had windows 8.1, I have been unable to use thunderbird email since. I have tried everything on the

  • Break out the messenger pigeons

    WOW iCloud email down for over 2 days....time to break out the pigeons.......Never thought this would be what it felt like to be one of the 1%....;-)

  • Feature Request for WSUS

    Feature request Server Clean up Wizard. Add an option to delete the entire Wsus database/files and start the download all over again. Product Classifications. Add an option - look only for updates where there is a computer that has a reported softwar