留言板
Failed to insert facelets composites from JAR - Liferay 7 GA3
Damien Guillermet,修改在7 年前。
Failed to insert facelets composites from JAR - Liferay 7 GA3
Junior Member 帖子: 44 加入日期: 15-7-9 最近的帖子
Hello,
Firstly thank you for your work, past and present.
I'm trying to upgrade few portlets using Liferay Faces from Liferay 6.2 to Liferay 7 (GA3).
After maven dependencies upgrade (following the new liferay version scheme) I was able to deploy my portlet to Liferay 7.
However I have an issue when I use xhtml templates (cf. ui:decorate) contained in my custom JAR (a web fragment module that regroup all shared code between portlets), resulting to an invalid path error in portlet view. All templates (ui:composition) are in /META-INF/resources/common folder.
Note that /META-INF folder also has a taglib (files are in /META-INF/tags) which I can use without error in my main WAR portlet, as same as custom components (interface/implementation).
I have no clue why it doesn't work anymore because when I was using Liferay 6.2 (GA6) all resources under WAR/WEB-INF/lib/JAR/META-INF/resources were treated like WAR/WEB-INF/resources (cf. Servlet 3.X specification).
EDIT :
I'm able to include templates if I add the javax.faces.FACELETS_RESOURCE_RESOLVER context parameter in the JAR web-fragment.xml (propagated to the web.xml of portlet WAR), pointing to a javax.faces.view.facelets.ResourceResolver implementation. But this is deprecated since JSF 2.2 and I should not use a such directive.
Thank you very much for your help.
Firstly thank you for your work, past and present.
I'm trying to upgrade few portlets using Liferay Faces from Liferay 6.2 to Liferay 7 (GA3).
After maven dependencies upgrade (following the new liferay version scheme) I was able to deploy my portlet to Liferay 7.
However I have an issue when I use xhtml templates (cf. ui:decorate) contained in my custom JAR (a web fragment module that regroup all shared code between portlets), resulting to an invalid path error in portlet view. All templates (ui:composition) are in /META-INF/resources/common folder.
Note that /META-INF folder also has a taglib (files are in /META-INF/tags) which I can use without error in my main WAR portlet, as same as custom components (interface/implementation).
I have no clue why it doesn't work anymore because when I was using Liferay 6.2 (GA6) all resources under WAR/WEB-INF/lib/JAR/META-INF/resources were treated like WAR/WEB-INF/resources (cf. Servlet 3.X specification).
EDIT :
I'm able to include templates if I add the javax.faces.FACELETS_RESOURCE_RESOLVER context parameter in the JAR web-fragment.xml (propagated to the web.xml of portlet WAR), pointing to a javax.faces.view.facelets.ResourceResolver implementation. But this is deprecated since JSF 2.2 and I should not use a such directive.
Thank you very much for your help.
Juan Gonzalez,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Damien.
In order to get the whole picture, please could you attach a simple portlet to reproduce?
Thanks!
In order to get the whole picture, please could you attach a simple portlet to reproduce?
Thanks!
Damien Guillermet,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Junior Member 帖子: 44 加入日期: 15-7-9 最近的帖子
Hello Juan, sure I'll do that Unless you have any clue with my edit.
Juan Gonzalez,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子Damien Guillermet:
Hello Juan, sure I'll do that Unless you have any clue with my edit.
I need more data and a simple portlet that can reproduce the problem will help for sure.
Thanks Damien.
Damien Guillermet,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Junior Member 帖子: 44 加入日期: 15-7-9 最近的帖子
Hello back Juan,
Here are the library and portlet projects in separate archives.
Note that the portlet will work because I added a facelets resource resolver in the library. So you can raise the error by commenting the directive in JAR's web-fragment.xml file.
Let me know I should reduce code more (like maven dependencies/plugins) ;)
Thanks a lot.
EDIT : I modified the structure to match the recommended one. Furthermore I have little troubles with included resources (css, js) via liferay-portlet.xml but we should discuss this later, expect if it's relative to my main issue
Here are the library and portlet projects in separate archives.
Note that the portlet will work because I added a facelets resource resolver in the library. So you can raise the error by commenting the directive in JAR's web-fragment.xml file.
Let me know I should reduce code more (like maven dependencies/plugins) ;)
Thanks a lot.
EDIT : I modified the structure to match the recommended one. Furthermore I have little troubles with included resources (css, js) via liferay-portlet.xml but we should discuss this later, expect if it's relative to my main issue
Juan Gonzalez,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Thanks very much Damien.
I reproduced this and checking the reasons...
Hope to be back soon.
I reproduced this and checking the reasons...
Hope to be back soon.
Juan Gonzalez,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Damien.
I am happy to say I already have a fix for this issue, but have to make some checks as it affects how resources are being accesed in Liferay 7.
Will update soon.
I am happy to say I already have a fix for this issue, but have to make some checks as it affects how resources are being accesed in Liferay 7.
Will update soon.
Juan Gonzalez,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Damien Guillermet,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Junior Member 帖子: 44 加入日期: 15-7-9 最近的帖子
Hello Juan,
thank you very much for your feedback I'll follow this closely
thank you very much for your feedback I'll follow this closely
Damien Guillermet,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Junior Member 帖子: 44 加入日期: 15-7-9 最近的帖子
Juan Gonzalez,修改在7 年前。
RE: Failed to insert facelets composites from JAR - Liferay 7 GA3
Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子Damien Guillermet:
Thank you for your work on the LPS-68989 issue now resolved ;)
It's a pleasure Damien. Just double-checked your portlet now renders everything :-D.
Thanks for telling us about this bug and thanks for using Liferay Faces ;-).