解决ArrayList集合类在jsp中报错的办法

 1.先下载apache-ant-1.6.5-bin.zip,将里面的ant.jar放入tomcat的com/lib目录下,并将com/lib/下的jasper-compiler-jdt.jar删除。

2.将以下内容覆盖tomcat/con/下的web.xml相应的位置(即<servlet-name>jsp</servlet-name>中相应的代码)。
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.5</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.5</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>

你可能感兴趣的:(apache,tomcat,jsp,ant,servlet)