自定义标签库,导入异常,报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>

有一点需要注意,可以使用后,再把注册删掉也可以运行

猜你喜欢

转载自blog.csdn.net/zcb1592781470/article/details/83048045