留言板
Broken images in Liferay 7
Hi,
I have a WAR file with my images in it. Images are located in WEB-INF/resources/images folder. In my XHTML when i reference the images
by /resources/images/imagename.png it is getting resolved to /o/warfilename/resources/images/imagename.png.
And this results in a broken image. Please help.
I have a WAR file with my images in it. Images are located in WEB-INF/resources/images folder. In my XHTML when i reference the images
by /resources/images/imagename.png it is getting resolved to /o/warfilename/resources/images/imagename.png.
And this results in a broken image. Please help.
Kyle Joseph Stiemann,修改在6 年前。
RE: Broken images in Liferay 7 (答复)
Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Hi Aparna,
Looks like you've run into a bug: https://issues.liferay.com/browse/FACES-3103. Please watch the issue to see when it has been resolved. To workaround this issue, use the library and name attributes of components or use EL to obtain the path to the resource. For example:
<h:graphicImage library="images" name="imagename.png" />
<h:graphicImage value="#{resource['images:imagename.png']}" />
- Kyle
Looks like you've run into a bug: https://issues.liferay.com/browse/FACES-3103. Please watch the issue to see when it has been resolved. To workaround this issue, use the library and name attributes of components or use EL to obtain the path to the resource. For example:
<h:graphicImage library="images" name="imagename.png" />
<h:graphicImage value="#{resource['images:imagename.png']}" />
- Kyle
Thanks Kyle ! That worked !!!
Kyle Joseph Stiemann,修改在6 年前。
RE: Broken images in Liferay 7
Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Thanks for reporting this bug, Aparna! And thanks for using Liferay Faces!
- Kyle
- Kyle