Given a simple template JSP for rendering by Sitemesh 3:
<%@include file="../jsp_inc/taglibs.jsp" %>
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href='<c:url value="/css/global.css" />' >
</head>
<body>
<h1>[HEADING]</h1>
<div>
<sitemesh:write property='body'/>
</div>
</body>
That template works as expected, inserting the content of the JSP element into the template.
As you might expect from the above, I want to be able to insert a value set in the JSP (eg. h1 element) into the appropriate element in my template.
I tried:
<sitemesh:getProperty property="page.heading"></sitemesh:getProperty>
in the template/decorator and:
<content tag="heading"></content>
In the JSP, per another question on SO but I think that may have been referring to Sitemesh 2. I am using Sitemesh 3.
Any suggestions?