title: what is the difference between uri and tagdir in JSP taglib
body: <p>I am cofused between <code>tagdir</code> and <code>uri</code> used in <code>taglib</code> directive.
  What is the real difference between using <code>tagdir</code> and <code>uri</code>?</p>
  
  <p>Examples :</p>
  
  <pre><code>&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="notMyTags" %&gt;
  
  &lt;%@ taglib uri="/WEB-INF/struts-html.tld" prefix="otherTags" %&gt;
  
  &lt;%@ taglib tagdir="/WEB-INF/tags" prefix="myTags" %&gt;
  </code></pre>
  
  <p>to the best of my understanding:</p>
  
  <p>1) I can access non-custom tags from the <code>uri</code> referencing them by the provided <code>prefix</code> (e.g.: if the <code>uri</code> defines the tag <code>hello</code>, in the page where <code>taglib-uri</code> is pasted, I can access it as <code>&lt;notMyTags:hello&gt;</code> or <code>&lt;otherTags:hello&gt;</code>).</p>
  
  <p>2) I can access custom tags defined within the path specified in <code>tagdir</code> referencing them by their <code>.tag</code> filenames because each custom tag corresponds to a <code>.tag</code> file (e.g.: if <code>hello.tag</code> is a file in the <code>tagDir</code> specified path, in the page where <code>taglib</code> is pasted, I can access it as <code>&lt;myTags:hello&gt;</code>)</p>