I'm wondering if you can come with an if/else with Apache Tiles 2 (or JSTL that references a Tiles attribute, that will try to). Essentially, I would like this:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<div>
    <!-- Some stuff here -->
</div>
<tiles:if condition="showSecondDiv == 'true'">
    <div>
        <!-- Some second stuff here -->
    </div>
</tiles:if>

There's <put-attribute name="showSecondDiv" value="true" type="string" /> within the Tiles XML. The motivation is the fact that I wish to reuse this JSP in many places, some that are looking to exhibit both divs, others that simply want to show one.

USING JSTL
example:

     <c:if test="${!empty tilesAdditionalTitle}">
       <fmt:param value="${requestScope[tilesAdditionalTitle]}"  />
     </c:if>