I try to do templating with JSF on different servers using Glassfish. I have a template.xhtml that defines footer, header, mainsection (localhost:8680)
The main.xhtml (localhost:8880) is on another server. What I want to do, is to use the template.xhtml that is on the other server.
This is where I define my mainsection in Template.xhtml:
<ui:insert name="body">Page Body</ui:insert>
This is the main.xhtml, that is using the template:
<ui:composition template="http://localhost:8680/myService/template.xhtml">
<ui:define name="body">
Welcome to the Main Section!
</ui:define>
</ui:composition>
When doing it on one server (within one web project, it works as usual).
But accessing main.xhtml via localhost:8880/myService/main.xhtml (Important: different server) simply does not work. The template.xhtml does not include the overwritten body of the main.xhtml.
Is it actually possible to implement a distributed UI, having one Microservice that is including the UI's of other Microservice?
Thanks in advance