-
Oct27
resin2升级为resin3后遇到的jsp显示问题
Posted in Linux, 1,054 views
-
将系统由resin 2.1.17升级为resin 3.0.25后,发现大部分JSP不能正常显示,错误都类似:
Caused by: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${user.ID}": Unable to find a value for "ID" in object of class "java.lang.String" using operator "." (null)
这是resin3与jstl的问题,需要将resin自带的jstl1.1禁用。
方法如下 :
将resin的conf文件中:
<servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"/>
修改为:
<servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet">
<init enable="false"/>
</servlet>在resin的webapp配置中,添加一个<jsp>标签
<web-app id="/test" document-directory="webapps/test">
<jsp fast-jstl="false"/>
</web-app>最后,将JSP文件中
<%@ taglib prefix=’c’ uri=’http://java.sun.com/jstl/core’ %>
修改为
<%@ taglib prefix=’c’ uri=’http://java.sun.com/jsp/jstl/core’ %>现在JSP可以正常显示了
Related posts:

Leave a comment | Trackback 这篇文章还没有评论.