使用freemarker+strust2显示页面的时候碰到错误:
FreeMarker template error!
Expression JspTaglibs is undefined on line 1, column 12 in page/example/example.ftl.
The problematic instruction:
----------
==> assignment: s=JspTaglibs["/WEB-INF/struts-tags.tld"] [on line 1, column 1 in page/example/example.ftl]
----------......
在网上找了很久都没有找到能解决问题解决办法,后来在旧项目中发现,只要在web.xml中配置下面的内容即可,使用JspTaglibs:
<servlet>
<servlet-name>JSPSupportServlet</servlet-name>
<servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Let life be beautiful like summer flowers and death like autumn leaves.