“cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'”错误的解决办法

今天写spring配置文件web.xml的时候出现    cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib    的错误,查资料后发现的命令空间引入的问题

解决方法很简单,把

http://www.springmodules.org/schema/cache/springmodules-cache.xsd

复制到头文件中的xmlns:xsi里就行了

下面附上代码,粗体部分为目标位置,粗体加斜体加删除线为需要复制的数据

<web-app version="2.5"

xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance http://www.springmodules.org/schema/cache/springmodules-cache.xsd"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容