cvc-complex-type.2.4.a错误解决方法

xml描述文件中指定对标签的引用时:

<taglib xmlns="http://java.sun.com/xml/ns/j2ee" >

XXXXXX

</taglib>

出现了以下错误:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'.

百度,发现<taglib>是<jsp-config>的子元素,需要将其写在<jsp-config></jsp-config>之间。

改为:

<jsp-config>

<taglib xmlns="http://java.sun.com/xml/ns/j2ee" >

XXXXXX

</taglib>

</jsp-config>

之后解决。

原文地址:https://www.cnblogs.com/lan-writenbook/p/4743498.html