Invalid content was found starting with element 'display-name',解决记录。

web.xml中servlet 标签下,标签报错,报错内容如下:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of 
 '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is 
 expected.

Invalid content was found starting with element 'display-name',解决记录。_第1张图片

解决办法:

将“display-name”作为“servlet”标记下的第一个元素移动,验证错误消失。

Invalid content was found starting with element 'display-name',解决记录。_第2张图片

你可能感兴趣的:(Invalid content was found starting with element 'display-name',解决记录。)