web.xml配置文件里面的true标签报错

时间:2022-11-02 09:15:35
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd "
id="WebApp_ID" version="2.5">

这是我之前新建的项目里面的,因为我建的版本是2.5,而<async-supported>true</async-supported>这个标签是在3.0之后才有的,所以把你项目的web-app改成3.0就好了

改好的如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd "
id="WebApp_ID" version="3.0">