润乾新版VR中由于tomcat6的bug导致的报错
一、问题描述
使用tomcat6发布新版VR相关JSP后报错:org.apache.jasper.JasperException: /mis2/reportcenter/showReport_reportFrame.jsp(179,15) Attribute value vr.getParam(“autoBig_dbType”).toString() is quoted with ” which must be escaped when used within the value
二、解决思路
Google后问了下开发,主要原因是tomcat6中把标签里面的java代码当字符串处理了。
三、实现步骤
showReport_reportFrame.jsp中部分相关代码进行修改:
dbType=”<%=vr.getParam(“autoBig_dbType”).toString() %>”
dsName=”<%=vr.getParam(“autoBig_dsName”).toString() %>”
totalCountExp=”<%=vr.getParam(“autoBig_totalCountExp”).toString() %>”
pageCount=”<%=vr.getParam(“autoBig_pageCount”).toString() %>”
cachePageNum=”<%=vr.getParam(“autoBig_cachePageNum”).toString() %>”
改为:
dbType=’<%=vr.getParam(“autoBig_dbType”).toString() %>‘
dsName=’<%=vr.getParam(“autoBig_dsName”).toString() %>’
totalCountExp=’<%=vr.getParam(“autoBig_totalCountExp”).toString() %>’
pageCount=’<%=vr.getParam(“autoBig_pageCount”).toString() %>’
cachePageNum=’<%=vr.getParam(“autoBig_cachePageNum”).toString() %>’
四、结尾总结
遇到新问题,先问google老师,不懂的再联系相关开发,解决问题。