3

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.

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
user1690526
  • 31
  • 1
  • 2
  • Take a look at this: http://stackoverflow.com/questions/7220275/can-i-import-my-own-jsp-page-into-another-jsp-page/7222401#7222401 – MD Sayem Ahmed Sep 22 '12 at 08:03

3 Answers3

3

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:

Community
  • 1
  • 1
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
0

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

jarek.jpa
  • 556
  • 1
  • 4
  • 17
0

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.

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
Karl Kildén
  • 2,305
  • 20
  • 32