freemarker怎么获取session中的值?

直接使用${属性名}即可。

后台在session中set值。

httpSession.setAttribute("source", source);

前台freemarker的ftl文件中取session的值:

<input type="hidden"  <#if source??> value="${source}" </#if> name="source">
原文地址:https://www.cnblogs.com/super-chao/p/15120249.html