我尝试了多种方法来访问资源文件夹中的图标或图像,但是没有运气
唯一的一个工作
primefaces-start:images / ui-bg_gloss-wave_50_6eac2c_500x100.png
我试过我的项目名称不起作用,其他名称不起作用
{resource ['test-jsf:images / light-buld_1.jpg']}
<p:graphicImage value="#{resource['primefaces-start:images/ui-bg_gloss-wave_50_6eac2c_500x100.png']}" />
<p:graphicImage value="#{resource['primefaces-afterdark:/resources/demo/images/dock/stack.png']}" />
<p:graphicImage value="#{resource['primefaces-start:/resources/demo/images/dock/stack.png']}" />
<p:stack icon="#{resource['test-jsf:icon/light-buld_1.jpg']}" expanded="true">
<p:menuitem value="Music" icon="#{resource['icon/light-buld_1.jpg']}" url="#" />
<p:menuitem value="d" icon="#{resource['test-jsf:images/light-buld_1.jpg']}" url="#" />
<p:menuitem value="d" icon="#{resource['test-jsf:/images/light-buld_1.jpg']}" url="#" />
<p:menuitem value="f" icon="#{resource['primefaces-start:images/ui-bg_gloss-wave_50_6eac2c_500x100.png']}" url="#" />
</p:stack>
我的代码,如果您想检查此仓库 在此端口和URL上运行