jsf - Problem with outputlink on files -
i'm working on jsf 2.0 project using mojarra, primefaces , tomcat 6.x.
i created outputlink point files. these files external of war in directory under apache httpd's control.
<h:outputlink value="#{fileitem.linktarget.sourceurl}">#{fileitem.boname} (#{fileitem.linktarget.mediatype})</h:outputlink>
the sourceurl value /dir/subdir/file.pdf
. when sourceurl doesn't contains space it's work. when contains space, are replace +
. /dir/subdir/big file.pdf
become /dir/subdir/big+file.pdf
. when replace +
space in normal webbrowser, it's work?
what's wrong , how can fix it?
i same problem graphicimage of mojarra , solve using primefaces's graphicimage.
in general not recommend use blank spaces in urls.
if have no influence on file names in url's should url-encode these names described here url-encoding. blank space has replaced %20. maybe there java class encoding you. know php, there have function urlencode().
Comments
Post a Comment