解決"taglib definition not consistent with specification version"

1. 問題描述

      從tomcat 6 遷移到tomcat 7 時,運行web項目時出現"taglib definition not consistent with specification version"

      從上面可以看出, 這是taglib的定義不符合規範版本的原因引起來的

      下圖可看出錯誤的地方:


2. 解決方法

    修改web.xml, 如下:

修改前:

<taglib>
    <taglib-uri>/custom</taglib-uri>
    <taglib-location>/WEB-INF/tld/custom.tld</taglib-location>
</taglib>

修改後:

<!-- 自定義標籤 -->
<jsp-config>
    <taglib>
	<taglib-uri>/custom</taglib-uri>
	<taglib-location>/WEB-INF/tld/custom.tld</taglib-location>
    </taglib>
</jsp-config>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章