使用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]
----------......
在網(wǎng)上找了很久都沒有找到能解決問題解決辦法,后來在舊項目中發(fā)現(xiàn),只要在web.xml中配置下面的內(nèi)容即可,使用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.