• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sitemesh with JSF

 
gunjan bohra
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to user sitemesh with JSF,
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">
<tr>
<td>
<page:applyDecorator page="/jsp/decorator/header.jsp" name="panel" title="menu"/>
</td>
</tr>
<tr>
<td>
<decorator:body/>
</td>
</tr>
</table>

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" %>
<f:view>
<table>
<tr>
<td>
<hutputText id="userName" value="Test Value"/>
</td>
</tr>
</table>
</f:view>

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


<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<filter-mapping>


<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

If I want to put <f:view > tag in decorator file ....
It's giving me error .
java.lang.NullPointerException
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)

Please help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic