title: JSP Tag Library and xhtml
body: <p>I trying to create a custom tag the Java way, by extending <code>TagSupport</code>. I'm want to use the custom tag to render some html in a xhtml file which also used RichFaces and JSF.</p>
  
  <p>All the tutorials I've seen regarding custom tags you register then in a <code>jsp</code> page via:</p>
  
  <pre><code> &lt;% taglib prefix="example" tagdir="/WEB-INF/tag-descriptor.tld" %&gt;
  </code></pre>
  
  <p>However this does not work in xhtml documents. I've seen the custom xhtml tags based on xhtml snippets, but I really need logic in the code.</p>
  
  <p>So how do you register a jsp tag lib in jsf? Is this possible? And if not, is there anyway to script java in a xhtml page as you do with jsp?</p>