taglib 学习, web xml 配置

 <jsp-config>

 <taglib>

       <taglib-uri>/WEB-INF/test.tld</taglib-uri>

       <taglib-location>/WEB-INF/test.tld</taglib-location>

 </taglib>

 </jsp-config>



近来在晚 jsp,配置 taglib, 发现错误


cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'. One of '{"http://

java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://

java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":distributable, "http://

java.sun.com/xml/ns/javaee":context-param, "http://java.sun.com/xml/ns/javaee":filter, "http://

java.sun.com/xml/ns/javaee":filter-mapping, "http://java.sun.com/xml/ns/javaee":listener, "http://

java.sun.com/xml/ns/javaee":servlet, "http://java.sun.com/xml/ns/javaee":servlet-mapping, "http://

java.sun.com/xml/ns/javaee":session-config, "http://java.sun.com/xml/ns/javaee":mime-mapping,

"http://java.sun.com/xml/ns/javaee":welcome-file-list, "http://java.sun.com/xml/ns/javaee":error-

page, "http://java.sun.com/xml/ns/javaee":jsp-config, "http://java.sun.com/xml/ns/javaee":security-

constraint, "http://java.sun.com/xml/ns/javaee":login-config, "http://java.sun.com/xml/ns/

javaee":security-role, "http://java.sun.com/xml/ns/javaee":env-entry, "http://java.sun.com/xml/ns/

javaee":ejb-ref, "http://java.sun.com/xml/ns/javaee":ejb-local-ref, "http://java.sun.com/xml/ns/

javaee":service-ref, "http://java.sun.com/xml/ns/javaee":resource-ref, "http://java.sun.com/xml/ns/

javaee":resource-env-ref, "http://java.sun.com/xml/ns/javaee":message-destination-ref, "http://

java.sun.com/xml/ns/javaee":persistence-context-ref, "http://java.sun.com/xml/ns/

javaee":persistence-unit-ref, "http://java.sun.com/xml/ns/javaee":post-construct, "http://

java.sun.com/xml/ns/javaee":pre-destroy, "http://java.sun.com/xml/ns/javaee":message-destination,

"http://java.sun.com/xml/ns/javaee":locale-encoding-mapping-list}' is expected.


搜索的结果是说taglib 必须放在 jsp-config 下

你可能感兴趣的:(jsp,taglib)