title: JSF - Composite Component include js file
body: <p>how can i add a js file to my own composite component taglib?</p>
  
  <p>I have following strucuture:</p>
  
  <p>src/main/resources/META-INF/ <br/>
  - mytaglib.xml <br/>
  - faces-config.xml</p>
  
  <p>src/main/resources/META-INF/resources <br/>
  - myComponent.xhtml</p>
  
  <p>In myComponent.xhtml i want to add a js file. How can i do this and where i have to put this js file?</p>
  
  <p>Solved - see my comment</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:cc="http://java.sun.com/jsf/composite"
  xmlns:p="http://primefaces.org/ui"
  xmlns:f="http://java.sun.com/jsf/core"&gt;
  &lt;head&gt;
  &lt;title&gt;An button with JS&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;cc:interface&gt;
      &lt;h:outputScript library="js" name="test.js" /&gt;
  &lt;/cc:interface&gt;
  &lt;cc:implementation&gt;
      &lt;p:commandLink value="test" onclick="myFunc();" /&gt;
  &lt;/cc:implementation&gt;
  &lt;/body&gt; 
  &lt;/html&gt; 
  </code></pre>