Java cvc复杂类型。2.2:元素';地点';必须没有元素[子元素]
我在我的错误页面上的web.xml文件中遇到此错误标记: cvc复杂类型。2.2:元素“位置”必须没有元素 [儿童] 我的web.xml文件如下所示(未显示其他标记): xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance“Java cvc复杂类型。2.2:元素';地点';必须没有元素[子元素],java,web.xml,custom-error-pages,Java,Web.xml,Custom Error Pages,我在我的错误页面上的web.xml文件中遇到此错误标记: cvc复杂类型。2.2:元素“位置”必须没有元素 [儿童] 我的web.xml文件如下所示(未显示其他标记): xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance“ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee “version=“3.0”> 404 /pages/error/404.jsp 修正: Servlet 3.0
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee “version=“3.0”>
404
/pages/error/404.jsp
修正:
Servlet 3.0不支持这些错误页面标记:
将Servlet版本更改为:version=“2.5”,并在web.xml的标题中将schemaLocation更改为web-app_2_5.xsd
<error-page>
<error-code>404</error-code>
<location>/pages/error/404.jsp</location>
</error-page>
</web-app>