首页 > 代码库 > taglib报错The content of element type "taglib" must match "(tlib-version,...)

taglib报错The content of element type "taglib" must match "(tlib-version,...)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
                        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

<taglib >

...

改成这样就不报错了:

------------------------------------------------------------------------------------
<?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/j2ee web-jsptaglibrary_2_0.xsd"  
    version="2.0">  

taglib报错The content of element type "taglib" must match "(tlib-version,...)