web.xml 错误
cvc-complex-type.2.3: Element ‘web-app’ cannot have character [children], because the type’s content
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
version="2.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
修改为:
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
version="2.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
本文解决了一个关于web.xml文件中因schemaLocation路径错误导致的问题。具体表现为元素‘web-app’不能有字符[子节点],因为该类型的内容不正确。通过调整schemaLocation中的URL指向正确的地址,成功解决了此问题。

46万+

被折叠的 条评论
为什么被折叠?



