掲示板

Broken images in Liferay 7

6年前 に Aparna Paibhale によって更新されました。

Broken images in Liferay 7

New Member 投稿: 3 参加年月日: 17/03/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
6年前 に Kyle Joseph Stiemann によって更新されました。

RE: Broken images in Liferay 7 (回答)

Liferay Master 投稿: 760 参加年月日: 13/01/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
6年前 に Aparna Paibhale によって更新されました。

RE: Broken images in Liferay 7

New Member 投稿: 3 参加年月日: 17/03/21 最新の投稿
Thanks Kyle ! That worked !!!
thumbnail
6年前 に Kyle Joseph Stiemann によって更新されました。

RE: Broken images in Liferay 7

Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
Thanks for reporting this bug, Aparna! And thanks for using Liferay Faces!

- Kyle