查看web-app_2_3.dtd的版本,2.3以前默认isELIgnored属性是true
<xsd:attribute name = "isELIgnored" default = "true" type = "Bool"/>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
</web-app>
解决方法:
1.添加指令
<%@page isELIgnored="false" %>
2.修改头文件信息
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
永久解决方法:
在本地仓库中在
在此路径下找到最新的版本,我的是1.4进入压缩打开选中的jar
重新编辑改文件
保存后同意修改压缩即可永远解决web.xml版本过低
参考:https://blog.csdn.net/m0_43453853/article/details/90900755