How can I include a servlet page , in a JSF page. Is there a way to do that?
Thank!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s possible with a custom
UIComponent. My colleague Arjan Tijms has written a blog article about this 2 years ago: Facelets and legacy JSP.It’s some code, but the principle is easy, the component does a
RequestDispatcher#include()with a customHttpServletResponseWrapperwhich captures the written output and then writes it to the body of the JSF component.Since recently, this component is also available as
<o:resourceInclude>of the OmniFaces library, maintained by Arjan and me.Last but not least, I’d like to repeat his last words.