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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -