在eclipse动态网页项目中,编写web.xml时,servlet标签报错.

cvc-complex-type.2.4.b: The content of element 'servlet' is not complete. One of '{"http://
java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name,
"http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":servlet-name}' is
expected.

先了解一下xmlns

在我们编写的web.xml中,第二行就有一个xmlns
出现上述问题是因为xmln中的url版本太老

将其用浏览器打开,会在第四行左右看到一个last version,将其替换到xmlns到即可.

posted @ 2019-11-20 15:12  断腿三郎  阅读(2477)  评论(0编辑  收藏  举报