ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Advanced SiteMesh
Subject:   JSF and Sitemesh
Date:   2004-11-15 03:14:54
From:   Gururaj

I am trying to user sitemesh with JSF, I am facing a typical problem with sitemesh and JSF,
Can somebody please tell me where am I going wrong

my Decorator.jsp is as follow

<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<page:applyDecorator page="/jsp/decorator/header.jsp" name="panel" title="menu"/>

and header.jsp is as follow

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<h:outputText id="userName" value="Test Value"/>

my faces servlet mapping and sitemesh mappings are as follow (in web.xml)

<servlet-name>Faces Servlet</servlet-name>


If put f:view tag in header.jsp I get the following error

instead if I remove all JSF tags like <f:view> and <h:outputText> then it works fine
I tried to apply the decorator using ýpage=faces/jsp/decorator/header.jspý in decorator.jsp, since faces servlet mapping uses faces/* (in web.xml)
any configuration problem or something else ??

One more thing is
Instead of <page:applyDecorator> if I use <%@ include file="jsp/decorator/header.jspý " %>
It is throwing faces context exception
Please help me

PS: please refer http://forums.java.sun.com/thread.jsp?thread=526351&forum=427&message=2807796
for the similar posting.

Thanks and Regards,
Gururaj Kulkarni
IonIdea Enterprise Solutions Pvt. Ltd.
#38-40, Export Promotion Industrial Park,
Whitefield, Bangalore - 560066.