1. 程式人生 > >自定義標籤庫,匯入異常,報500錯誤

自定義標籤庫,匯入異常,報500錯誤

HTTP Status 500 - The absolute uri: http://java.zcb.common cannot be resolved in either web.xml or the jar files deployed with this application

http://java.zcb.common這是我自定義的標籤庫路經


錯誤原因 :未在web.xml中進行註冊該自定義標籤:

那就是需要注入自定義標籤庫

或者是tid的路徑不對,需要放在web-inf下面

解決方法 :在web.xml中進行註冊該自定義標籤


     --程式碼如下--
   
    <!-- 註冊自定義標籤 -->
    <jsp-config>
    <taglib>
     <!-- 引入自定義標籤的唯一識別符號 -->
      <taglib-uri>http://java.zcb.common</taglib-uri>
     <!-- 自定義標籤的tld配置檔案 -->
      <taglib-location>/tld/common.tld</taglib-location>
    </taglib>
    </jsp-config>

 

有一點需要注意,可以使用後,再把註冊刪掉也可以執行