留言板

Broken images in Liferay 7

Aparna Paibhale,修改在6 年前。

Broken images in Liferay 7

New Member 帖子: 3 加入日期: 17-3-21 最近的帖子
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.
thumbnail
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
Aparna Paibhale,修改在6 年前。

RE: Broken images in Liferay 7

New Member 帖子: 3 加入日期: 17-3-21 最近的帖子
Thanks Kyle ! That worked !!!
thumbnail
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