tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Theobald <...@openobjects.com>
Subject [Tiles 2 Standalone] Where are my JSTL/EL variables?
Date Tue, 22 Jan 2008 15:39:26 GMT

HI all,

I'm having a look at Tiles and I'm having a few problems getting it to work
with my JSTL.  Could somebody take a look at the following code and let me
know if I'm doing anything wrong.  I'm using Tiles on it's own with plain
JSPs some core tag libraries.  Here's my code:

&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

&lt;%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %&gt;
&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt;
&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %&gt;
&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %&gt;

&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
&lt;title&gt;&lt;tiles:getAsString name="pageTitle"
&lt;div id="pagewrap"&gt;
	&lt;div id="header"&gt;
		&lt;tiles:insertAttribute name="header" /&gt;
	&lt;div id="main"&gt;
		&lt;tiles:insertAttribute name="main" /&gt;

&lt;c:set var="test" value="Wibble"/&gt;
&lt;p&gt;Test = &lt;c:out value="${test}"/&gt;&lt;/p&gt;
&lt;dl id="requestvars" style="display:none;"&gt;
	&lt;c:forEach var='parameter' items='${paramValues}'&gt;
		&lt;c:when test="${empty parameter.value[0]}"&gt;

&lt;%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%&gt;

&lt;tiles:insertTemplate template="templates/template.jsp"&gt;
	&lt;tiles:putAttribute name="pageTitle" value="Hello world!" /&gt;
	&lt;tiles:putAttribute name="header" type="template"
value="../includes/header.jspf" /&gt;
	&lt;tiles:putAttribute name="main" type="template"
value="../includes/main.jspf" /&gt;

I'm wondering if I am declaring my taglibs in the right place.  I've tried
putting them in all three pages though and it doesn't help.  Also if it
helps, I have tiles initialised/defined as a startup servlet in my web.xml.

View this message in context: http://www.nabble.com/-Tiles-2-Standalone--Where-are-my-JSTL-EL-variables--tp15021180p15021180.html
Sent from the tiles users mailing list archive at Nabble.com.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message