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:
Template <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title><tiles:getAsString name="pageTitle" ignore="true"/></title> </head> <body> <div id="pagewrap"> <div id="header"> <tiles:insertAttribute name="header" /> </div> <div id="main"> <tiles:insertAttribute name="main" /> </div> </div> </body> </html> Header <h1>HEADER</h1> <c:set var="test" value="Wibble"/> <p>Test = <c:out value="${test}"/></p> <h3>Params</h3> <dl id="requestvars" style="display:none;"> <c:forEach var='parameter' items='${paramValues}'> <dt>${parameter.key}</dt> <c:choose> <c:when test="${empty parameter.value[0]}"> <dd> </dd> </c:when> <c:otherwise> <dd>${parameter.value[0]}</dd> </c:otherwise> </c:choose> </c:forEach> </dl> Index.jsp <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%> <tiles:insertTemplate template="templates/template.jsp"> <tiles:putAttribute name="pageTitle" value="Hello world!" /> <tiles:putAttribute name="header" type="template" value="../includes/header.jspf" /> <tiles:putAttribute name="main" type="template" value="../includes/main.jspf" /> </tiles:insertTemplate> 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.
