Archive for June, 2013

Little tip for mixing JSTL and Tiles

June 19, 2013 1 comment

If you want to use a value set in Tiles with JSTL in a JSP page, here’s how you do it:

<tiles:useAttribute name="anAttributeYouSetInGeneralXML"  id="theVarToUseInJSTL" classname="java.lang.Boolean"/>


<c:when test="${theVarToUseInJSTL==true}">

This is shown when anAttributeYouSetInGeneralXML is set to True



and in the definition file:

<put-attribute name="anAttributeYouSetInGeneralXML" value="true" cascade="true"/>
Categories: R&D Tags: , ,