EL表达式在tomcat7.0下的new关键字不能使用

最近生产系统部署个小应用,服务器选型tomcat7.0,一直运行得好好的,最近看日志发现消息发布功能报白页。贴日志:

org.apache.jasper.JasperException: /news/listNews.jsp (line: 32, column: 70) "${new.title}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${new.title}]

 本地环境tomcat6.0跑起来好好的。

 

参考文档:http://stackoverflow.com/questions/3879794/spring-3-petclinic-owner-new-invalid-expression-in-tomcat-7

 

T7.0里面:"new" is a Java keyword and hence ${owner.new} is not legal EL。Tomcat 7 enforces this rule by default (Tomcat 6 doesn't for backwards compatibility). The bug is in the Spring sample app.

 

PS:升级tomcat到7.0所有的EL表达式中的new属性都得替换,问题解决。

你可能感兴趣的:(tomcat7)