方法一:在jsp页面中加上
<%@ page isELIgnored=“false” %>(实测可用)
其他方法:
方法二
web.xml中加上,简单,但是还不是好的解决办法。
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>
方法三
将项目的WEB-INF下的web.xml文件修改
在默认情况下,Servlet 2.3 / JSP 1.2是不支持EL表达式的,而Servlet 2.4 / JSP 2.0及更高版本支持El表达式
这里是servlet3.1.0版本
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">