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.
Asked
Active
Viewed 3,263 times
3
![](../../users/profiles/157882.webp)
BalusC
- 992,635
- 352
- 3,478
- 3,452
![](../../users/profiles/1690526.webp)
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 Answers
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:
0
As a temp hack you may call the JSF page from within an IFrame embedded in the JSP page.
![](../../users/profiles/756301.webp)
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.
![](../../users/profiles/157882.webp)
BalusC
- 992,635
- 352
- 3,478
- 3,452
![](../../users/profiles/968878.webp)
Karl Kildén
- 2,305
- 20
- 32