1,web.xml里配置
<web-app version="2.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
其中http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">一行报错:
cvc-complex-type.2.3: Element 'web-app' cannot have character [children], be
解决方法:
将上面的第二行xmlns="http://java.sun.com/xml/ns/javaee"改为:
xmlns="http://java.sun.com/xml/ns/j2ee"
转载于:https://my.oschina.net/veichang/blog/995724