Tiles allows the visibility of a template, an attribute or a definition only to selected roles.
A definition can be allowed to be rendered only by selected roles:
<definition name="test.definition" template="/layout/my-template.jsp role="myrole"> ... </definition>
<tiles:insertDefinition name="test.definition" role="myrole" />
<tiles:definition name="test.definition" template="/layout/my-template.jsp" role="myrole"> ... </tiles:definition>
An attribute can be allowed to be rendered only by selected roles:
<definition name="test.definition" template="/layout/my-template.jsp> <put-attribute name="header" value="/header.jsp" role="myrole" /> </definition>
<tiles:insertAttribute name="header" role="myrole" />
<tiles:putAttribute name="header" value="/header.jsp" role="myrole" />