Wednesday, August 08, 2007

Including one JSF page in another

It seems there is some confusion on how to include one JSF page within another. Here are the steps to include inner.jsp into outer.jsp

1. In outer.jsp, include inner.jsp as a simple JSP include.

<%@ include file="inner.jsp" %>

2. In inner.jsp, include the JSF tag libraries

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

3. In inner.jsp, create the subview at the beginning of the page:



4. At the end of inner.jsp, close the subview tag

Labels: ,

2 Comments:

Anonymous Anonymous said...

A great tip. It helped me a lot. Thanks.

7:16 PM  
Anonymous Anonymous said...

thanx a lot.........
it really works

3:11 PM  

Post a Comment

<< Home