If we need to use spring security tags in free marker, do as following:
<#assign security=JspTaglibs["/WEB-INF/security.tld"]/>
<#if Session["SPRING_SECURITY_CONTEXT"]?exists>
<ul>
<li>${Session["SPRING_SECURITY_CONTEXT"].authentication.name}</li>
<li>
<#assign authorities = Session["SPRING_SECURITY_CONTEXT"].authentication.authorities />
<#list authorities as authority>
${authority}
</#list>
</li>
</ul>
<@security.authentication property="name" ></@security.authentication>
<@security.authorize ifAnyGranted="MTXTU-TestPerm,MTXTU-TestPerm2"> Welcome to Runtime.</@security.authorize>
</#if>
16 November 2012 Suzhou, ChinaCheers!