user1690526
user1690526

Reputation: 31

How to include a Facelets file in a JSP file?

I have a JSP page main.jsp and in that page I want to include a Facelets page menu.xhtml. How can I achieve this? I have searched a lot and there does not seem to be any way.

Upvotes: 3

Views: 3396

Answers (3)

Karl Kildén
Karl Kildén

Reputation: 2435

Make main.xhtml. Include jsp with OmniFaces resourceinclude.

So basically you make a dummy xhtml page and include jsp with omnifaces and jsf the normal jsf way.

Upvotes: 0

jarek.jpa
jarek.jpa

Reputation: 595

As a temp hack you may call the JSF page from within an IFrame embedded in the JSP page.

Upvotes: 0

BalusC
BalusC

Reputation: 1109695

That's not possible. Facelets (XHTML) is basically the successor of JSP and is supposed to be used as a replacement of JSP. You should migrate all your legacy JSP pages to modern Facelets. Then you can use Facelets' <ui:include> to include another Facelets file.

See also:

Upvotes: 3

Related Questions