tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "doktora v" <dokt...@gmail.com>
Subject tiles2: inject bean via putAttribute
Date Fri, 16 Nov 2007 20:34:05 GMT

When I try the code below and in "layout.jsp" I do

<tiles:insertAttribute name="bodyContent"/>

the rendered html displays "${bodyContent}" rather than the expected
"Body Content defined by an el".

Am I doing something wrong, or is this not working yet (I'm using
tiles 2.0.5 with struts 1.3.8).

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<c:set var="bodyContent" value="Body Content defined by and el" />

<tiles:insertTemplate template="/layout.jsp">
  <tiles:putAttribute name="title"  value="This is the title." />
  <tiles:putAttribute name="header" value="/header.jsp" />
  <tiles:putAttribute name="body"   value="${bodyContent}" />

View raw message