在配置web.xml时,警报
cvc-complex-type.2.3: Element ‘servlet-mapping’ cannot have character [children], because the type’s content type is element-only.
其中web.xml的约束为:
<?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"
version="3.0">
将第四行的javaee改为j2ee即可,如下图:
警告消除