有没有办法摆脱这些警告? 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>
答案 0 :(得分:1)
在您加载图像的控制器中,您必须添加指向文件名的链接。
即
<p:graphicImage value="#{displayImage.file}" **name="#{image.filename}"** alt="Image Description for #{image.description}" stream="true" title="#{image.copyrightnote}">
希望它有所帮助。
干杯gan