开发者

web.xml validation error

开发者 https://www.devze.com 2023-02-15 08:19 出处:网络
I have got one more error in web xml -开发者_如何转开发Cannot resolve the name \'javaee:web-appType\' to a(n) \'type definition\' component.

I have got one more error in web xml

-开发者_如何转开发Cannot resolve the name 'javaee:web-appType' to a(n) 'type definition' component.

and web.xml file

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


You forgot the xmlns:web namespace. Here's the complete Servlet 3.0 compatible declaration.

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

    <!-- Config here -->

</web-app>
0

精彩评论

暂无评论...
验证码 换一张
取 消