I need to provide a link to a file in the server's filesystem. In plain HTML something like this does it:
<a href="C:\Users\user\resources\147ebg.jpg">Image or word doc or whatever</a>
But I can't seem to get this simple thing working with JSF 2. I tried h:outputLink
like this:
<h:outputLink value="C:\Users\e\workspace\IDEXRoughAuctions\WebContent\resources\147ebg.jpg" id="test1">Testing output link</h:outputLink>
but when I click on the link nothing happens. (I tried windows and unix style separators, and also prepending file:/// before the path, with no luck.)
The same happens with h:commandLink
, and just plain h:link
, which are anyway geared, if I understand correctly, towards navigating between JSF pages. (And yes, I tried to put them in a form, although that makes little sense.)
So how is this simple task done?