空文件名的Mime类型警告

时间:2013-09-15 14:55:25

标签: jsf jsf-2 icefaces icefaces-3

有没有办法摆脱这些警告? file ""是什么意思。我已经在web.xml中添加了以下内容

00000030 context       W   JSF1091: No mime type could be found for file "".  
To resolve this, add a mime-type mapping to the applications web.xml.

的web.xml

<mime-mapping>
    <extension>gif</extension>
    <mime-type>image/gif</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>jpeg</extension>
    <mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>jpg</extension>
    <mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>png</extension>
    <mime-type>image/png</mime-type>
</mime-mapping>
<mime-mapping> 
     <extension>xml</extension> 
     <mime-type>application/xml</mime-type> 
</mime-mapping>

1 个答案:

答案 0 :(得分:1)

可能是为时已晚,但我最近遇到了同样的问题。

在您加载图像的控制器中,您必须添加指向文件名的链接。

<p:graphicImage value="#{displayImage.file}" **name="#{image.filename}"** alt="Image Description for #{image.description}" stream="true" title="#{image.copyrightnote}">
希望它有所帮助。 干杯gan