web.xml验证错误 [英] web.xml validation error

查看:121
本文介绍了web.xml验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在web xml中还有一个错误

I have got one more error in web xml


- 不能将名称'javaee:web-appType'解析为a(n )'类型定义'组件。

-Cannot resolve the name 'javaee:web-appType' to a(n) 'type definition' component.

和web.xml文件

<?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"


推荐答案

你忘记了 xmlns:web 命名空间。这是完整的Servlet 3.0兼容声明。

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>

这篇关于web.xml验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆