Search code examples
jspincludefacelets

How to include a JSP file in a Facelets file?


How can I include a .jsp file into a facelet?


Solution

  • This is by default not supported. You need to create a custom component for this. You can find complete examples in this blog and this answer. The OmniFaces component library has a reuseable <o:resourceInclude> component for this.

    <html ... xmlns:o="http://omnifaces.org/ui">
    ...
    <o:resourceInclude path="/foo.jsp" />