In my tomcat I have defined two context.
One is my application URL, which is
http://localhost:8080/mysite/faces/abc.xhtml
another one is
There are several options:
Use <iframe> instead.
Refactor the shared files into a separate web fragment project which should end up as JAR in /WEB-INF/lib of both webapps. Put the Facelets resources in the /META-INF/resources folder of the separate web fragment project. It'll be available for <ui:include> the usual way: Structure for multiple JSF projects with shared code.
When on JSF 1.x, use a custom com.sun.facelets.impl.DefaultResourceResolver: How to use Facelets composition with files from another context.
When on JSF 2.x, use a custom javax.faces.view.facelets.ResourceResolver: how to share a jsf error page between multiple wars.
When on JSF 2.2+, use a custom javax.faces.application.ResourceHandler: Obtaining Facelets templates/files from an external filesystem or database.