Search code examples
struts2tiles2struts-configstruts-html

Struts2 tiles How to set attribute values in dynamically…


In tiles.xml set attribute values in static

<tiles-definitions>
<definition name="baseLayout" template="/site/layout.jsp" >
<put-attribute name="body" value="/index.jsp"/>
<put-attribute name="top" value="/site/footer.jsp"/>
<put-attribute name="bottom" value="/site/header.jsp"/>
</definition>
</tiles-definitions>

Can I give attribute values in dynamically.. .It is passable. Please give me some tips ..


Solution

  • Use a Preparer. Here's how.