项目导入后,一个tld文件提示以下错误:

Referenced file contains errors (http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_4.xsd). For more information, right click on the message in the Problems View and select “Show Details…” auth.tld /ROOT/src/main/webapp/WEB-INF line 1 XML Problem
如图:
这里写图片描述

解决办法:

将其中的“j2ee”都改为“javaee”就可以了。

<?xml version="1.0" encoding="UTF-8" ?>

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
        http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_4.xsd"
        version="2.4">

有文章指出必须固定为五行,我倒是没有发现此问题。


本文转载:CSDN博客