在后台往session中注入:

request.setAttribute("list", "Hello World from Spring !!");

部署在tomcat 5.0 中,页面直接打印:{list} 不能解析,或被屏蔽EL。

造成这种现象可能的原因:

  web.xml中的 version="2.5" 或以下, 而tomcat为5.0所有不能解析EL表达式,如果web.xml为2.5以上,tomcate为6.0以上则不会出现上述问题。

解决方案:

  1、改用tomcate 6.0以上的版本部署。

  2、将web.xml中的版本改为2.4使tomcat 5.0可以对其进行解析。

  3、在页面中加入:

<%@ page isELIgnored="false"%>

问题解决!!

 

相关文章:

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