title: Tomcat 8 cannot find custom tlds
body: <p>I had made a web site with spring boot.
  Now,
  I want to convert this to could be deployed in Tomcat 8.
  After converting it,
  Tomcat 8 is unable to find my custom TLD file,
  even when I set 'taglib-location' at the web.xml.</p>
  
  <p>Here is my project source</p>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns="http://java.sun.com/xml/ns/javaee" 
      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
      id="WebApp_ID" version="3.0"&gt;
  
      &lt;!-- tld --&gt;
      &lt;jsp-config&gt;
          &lt;taglib&gt;
              &lt;taglib-uri&gt;/tld/code-generator.tld&lt;/taglib-uri&gt;
              &lt;taglib-location&gt;/WEB-INF/tld/code-generator.tld&lt;/taglib-location&gt;
          &lt;/taglib&gt;
      &lt;/jsp-config&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>code-generator.tld</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
  &lt;taglib version="2.1"
      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/javaee/web-jsptaglibrary_2_1.xsd" &gt;
  
      &lt;tlib-version&gt;1.0&lt;/tlib-version&gt;
      &lt;short-name&gt;cdg&lt;/short-name&gt;
      &lt;uri&gt;/WEB-INF/tld/code-generator.tld&lt;/uri&gt;
  
      &lt;function&gt;
          &lt;name&gt;toCodeString&lt;/name&gt;
          &lt;function-class&gt;com.msh.nia.util.CodeGenerator&lt;/function-class&gt;
          &lt;function-signature&gt;java.lang.String toCodeString(java.lang.String)&lt;/function-signature&gt;
      &lt;/function&gt;
  
    ... etc
  </code></pre>
  
  <hr>
  
  <p><strong>index.jsp</strong></p>
  
  <pre><code>&lt;%@ taglib prefix="cdg" uri="/tld/code-generator.tld" %&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>directory structure</strong> : 
  <a href="https://i.stack.imgur.com/vOfui.png" rel="nofollow noreferrer">structure image</a></p>
  
  <hr>
  
  <p><strong>Errors and warning</strong></p>
  
  <pre><code>정보: Starting Servlet Engine: Apache Tomcat/8.5.34
  10월 17, 2018 11:48:05 오후 org.apache.jasper.servlet.TldScanner scanJspConfig
  경고: Failed to process TLD with path [/WEB-INF/tld/code-generator.tld] and URI [/tld/code-generator.tld]. The specified path does not exist.
  10월 17, 2018 11:48:05 오후 org.apache.jasper.servlet.TldScanner scanJars
  정보: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  10월 17, 2018 11:48:05 오후 org.apache.catalina.core.ApplicationContext log
  정보: 2 Spring WebApplicationInitializers detected on classpath
  
  ...
  
  2018-10-17 23:48:16.026  INFO 73568 --- [           main] o.a.c.s.Catalina                         : Server startup in 14987 ms
  2018-10-17 23:48:16.314 ERROR 73568 --- [nio-8080-exec-9] o.s.b.w.s.s.ErrorPageFilter              : Forwarding to error page from request [/index.jsp] due to exception [Unable to find taglib [cdg] for URI: [tld/code-generator.tld]]
  
  org.apache.jasper.JasperException: Unable to find taglib [cdg] for URI: [tld/code-generator.tld]
      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) ~[jasper.jar:8.5.34]
      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293) ~[jasper.jar:8.5.34]
      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80) ~[jasper.jar:8.5.34]
      at org.apache.jasper.compiler.TagLibraryInfoImpl.&lt;init&gt;(TagLibraryInfoImpl.java:181) ~[jasper.jar:8.5.34]
      at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431) ~[jasper.jar:8.5.34]
      at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489) ~[jasper.jar:8.5.34]
  </code></pre>