Thursday, August 30, 2007

Embedded Tomcat

My previous article on Tweaking Tomcat did not mention the use of Embedded Tomcat, which was necessary to run Tomcat programmatically in the same JVM. More information on this feature can be found in the following links:

http://www.vsj.co.uk/articles/display.asp?id=319
http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.html

Labels: ,

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: ,