原来在Web.xml中的配置如下:
<taglib>
<taglib-uri>organize-bea</taglib-uri>
<taglib-location>
/WEB-INF/tld/orgnanize-bean.tld
</taglib-location>
</taglib>
<taglib-uri>organize-bea</taglib-uri>
<taglib-location>
/WEB-INF/tld/orgnanize-bean.tld
</taglib-location>
</taglib>
但是在eclipse中,语法报错: cvc-complex-type.2.4.a
解决办法如下,在上图的代码结点外层加<jsp-config></jsp-config>标签。配置如下:
<jsp-config>
<taglib>
<taglib-uri>organize-bea</taglib-uri>
<taglib-location>
/WEB-INF/tld/orgnanize-bean.tld
</taglib-location>
</taglib>
</jsp-config>
<taglib>
<taglib-uri>organize-bea</taglib-uri>
<taglib-location>
/WEB-INF/tld/orgnanize-bean.tld
</taglib-location>
</taglib>
</jsp-config>

本文介绍了解决在Eclipse中配置Web.xml文件时出现的语法错误问题。通过在Taglib配置外添加<jsp-config>标签,可以有效解决cvc-complex-type.2.4.a错误。
1146

被折叠的 条评论
为什么被折叠?



