How to set selected item in menu. Using apache tiles + spring
===

I'm trying to set active menu item in apache tiles. My idea is to store selected item into cookies but i don't know if is it good practice. I can also make a new jsp for each view but i think its not so good. 

tiles conf:

        <definition name="base.definition"
                template="/WEB-INF/pages/layout/layout.jsp">
                <put-attribute name="menu" value="" />
                ..........
        </definition>
    
        <definition name="user/welcome" extends="base.definition">
            <put-attribute name="menu" value="/WEB-INF/pages/user/menu.jsp" />
            <put-attribute name="body" value="/WEB-INF/pages/user/welcome.jsp" />
        </definition>
        
        <definition name="user/list" extends="base.definition">
            <put-attribute name="menu" value="/WEB-INF/pages/user/menu.jsp" />
            <put-attribute name="body" value="/WEB-INF/pages/user/list.jsp" />
        </definition>

menu.jsp:

    <ul>
    	<li><a href="<c:url value='/user/welcome' />"><spring:message
    				code="menu.user.home" /></a></li>
    	<li><a href="<c:url value='/user/list' />"><spring:message
    				code="menu.user.list" /></a></li>
     .......
    </ul>