0

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

Niko
  • 23
  • 4
  • @matruskan: please flag as a duplicate. You are right, good find. I searched for this duplicate tonight for a different question for same user and did not find it. – Kukeltje Feb 03 '18 at 21:20
  • @matruskan thank you. I actually read this post but for what ever reason I thought it is not the solution for my problem. Obviously it is. – Niko Feb 05 '18 at 07:38

0 Answers0