Virgo 3.7.0 Fragment host, resource loading fails with JSF 2.2 [message #1761832] |
Thu, 11 May 2017 11:27  |
Eclipse User |
|
|
|
We try to migrate a web application (Virgo 3.6.4, Spring 3.2.5, JSF 2.1, Primefaces 3.5) to Virgo 3.7.0, JSF 2.2, Primefaces 6.0.
We use the Fragment-Host feature to load web resources from another bundle. The main web application works like a host bundle. The other bundle works as a fragement bundle and provides webpages (*.xhtml). It works very smooth with Virgo 3.6.4.
The resource loading of the fragement bundles does not to work in the new environment (Virgo 3.7.0, Spring 4.2.9, JSF 2.2, Primefaces 6)
(The exception is a javax.faces.view.facelets.TagAttributeException: Invalid path : ....)
JSF is not able to retrieve the .xhtml resource. (We work on a small example to sort out that the JSF upgrade is responsible for)
Has there been a change in Virgo 3.7.0 related with the Fragment-Host feature? Or does Gemini Web 3.0 bring some changes to it?
Anybody facing something similiar?
We use Virgo 3.7.0 (virgo-tomcat-server-3.7.1.D-20170508083732) provided by Violeta Georgieva (https://bugs.eclipse.org/bugs/show_bug.cgi?id=514227)
https://hudson.eclipse.org/virgo/view/3.7.0-SNAPSHOT/job/gradle-build/lastSuccessfulBuild/artifact/packaging/tomcat-server/build/distributions/virgo-tomcat-server-latest.zip
Thanks for hints,
Joël
|
|
|
|
Re: Virgo 3.7.0 Fragment host, resource loading fails with JSF 2.2 [message #1763877 is a reply to message #1763753] |
Mon, 22 May 2017 09:23  |
Eclipse User |
|
|
|
Hi Florian,
Yes, we finally proofed that it has not to do with Virgo 3.7! It's related to the migration of JSF 2.2.
We referenced resources in xhtml files like this:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
...
template="../layout/smallLayout.xhtml">
or
<ui:include src="../include/xyz.xhtml" />
With JSF 2.1 it was resolved to this path: jndi:/localhost/main/ct/index.xhtml and includes of fragment bundle resources worked fine
With JSF 2.2 it's resolved to: bundleentry://206.fwk540642172/ct/index.xhtml
(in JSF 2.2 the jndi path does not work: MalformedURLException: unknown protocol: jndi)
The path is created with a base URL (e.g. bundleentry://206.fwk540642172/). The base URL is fixed after start of the application and the bundle ID 206 points to the host-bundle not considering any fragment bundles.
We implemented our own JSF ResourceHandler to look up resources in fragment bundles. This works!
(Side note: We changed paths slightly to "/layout/smallLayour.xhtml", JSF does not trigger custom ResourceHandler for paths starting with "../")
Thanks anyway,
joël
|
|
|
Powered by
FUDForum. Page generated in 0.04492 seconds