开发者

web.xml validation error

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜