hi i want to take out the common content in the 2 FACES JSPS and put in one jsp and include two tabs in that FACESJSP and those two tabs will show the differet content any help with sample code pls?
Share
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.
It depends on the view technology in question. In JSP you can use
<jsp:include>for this. In Facelets you can use<ui:include>or<ui:composition>for this.When using JSF on JSP, you need to ensure that every include page has its own
<f:subview>with an unique ID.Basic example:
main.jsp:header.jspfooter.jspYou can even dynamically include a page, e.g.
where
#{bean.page}can return a page relative URL likepagename.jsp.When using JSF on Facelets (you aren’t, but this is just informal), the examples for Facelets can be found in their developer guide. It’s far more powerful than JSP and well suited for JSF.