• cdi
  • components
  • contexts
  • converters
  • eventlisteners
  • exceptionhandlers
  • facesviews
  • filters
  • functions
  • managedbeans
  • renderkits
  • resourcehandlers
  • scripts
  • taghandlers
  • utils
  • validators
  • viewhandlers
-
  • cache
  • commandScript
  • componentIdParam
  • conditionalComment
  • deferredScript
  • form
  • graphicImage
  • highlight
  • messages
  • moveComponent
  • onloadScript
  • outputFormat
  • outputLabel
  • param
  • resolveComponent
  • resourceInclude
  • tree
  • viewParam

The <o:resourceInclude> component can be used to catch the output from a JSP or Servlet resource and render it as output to the JSF writer. In effect, this allows you to include both Servlets and JSP pages in e.g. Facelets.

Note that this isn't recommended as a lasting solution, but it might ease a migration from legacy JSP with smelly scriptlets and all on them to a more sane and modern Facelets application.

Demo

Content before Servlet include
Output from Servlet
Content after Servlet include

Source code
<p>
    Content before Servlet include
    <br/>
    <o:resourceInclude path="/testservlet" />
    <br/>
    Content after Servlet include
</p>