tomcat6.0升级到tomcat7.0,访问项目时报错:Caused by: javax.el.ELException:


页面源码:

Caused by: javax.el.ELException:




Caused by: javax.el.ELException:

是因为,新的tomcat(我的是tomcat7)对EL表达式的语法进行了更加严格的检查。


此时tomcat的EL表达式解析器会把String类型转换为Long型而不是把pageHelper.pageNo类型转换为String进行比较, 当遍历到下一元素时,looper="...",这时String的类型已经确定,比较的时候tomcat还要试图将String转换为Long类型,于 是就出错了。


解决方案:

    先转换成String,用trim函数,再进行计较即可:

Caused by: javax.el.ELException:




转载于:https://blog.51cto.com/7883830/1589059

相关文章:

  • 2021-05-22
  • 2022-01-03
  • 2021-06-25
  • 2021-12-19
  • 2021-07-25
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-15
  • 2022-12-23
  • 2021-08-17
  • 2021-12-09
  • 2021-06-26
  • 2021-11-01
  • 2022-01-27
相关资源
相似解决方案