Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can't</p> <p>Simply because <code>&lt;h:outputScript /&gt;</code> can read <strong>only</strong> form local resource folder inside your web app</p> <p><strong>What you could do is use</strong> <a href="http://showcase.omnifaces.org/resourcehandlers/CDNResourceHandler" rel="nofollow">Omnifaces CDNResourceHandler</a> , and here is the <a href="http://omnifaces.org/docs/javadoc/current/org/omnifaces/resourcehandler/CDNResourceHandler.html" rel="nofollow">JavaDoc</a></p> <p>It will allow you to use with a remote file</p> <p><em>Here some code from the showcase</em></p> <p>To get it to run, this handler needs be registered as follows in faces-config.xml:</p> <pre><code>&lt;application&gt; &lt;resource-handler&gt;org.omnifaces.resourcehandler.CDNResourceHandler&lt;/resource-handler&gt; &lt;/application&gt; &lt;context-param&gt; &lt;param-name&gt;org.omnifaces.CDN_RESOURCE_HANDLER_URLS&lt;/param-name&gt; &lt;param-value&gt; js/script1.js=http://cdn.example.com/js/script1.js, somelib:js/script2.js=http://cdn.example.com/somelib/js/script2.js, otherlib:style.css=http://cdn.example.com/otherlib/style.css, images/logo.png=http://cdn.example.com/logo.png &lt;/param-value&gt; &lt;/context-param&gt; </code></pre> <p>With the above configuration, the following resources:</p> <pre><code>&lt;h:outputScript name="js/script1.js" /&gt; &lt;h:outputScript library="somelib" name="js/script2.js" /&gt; &lt;h:outputStylesheet library="otherlib" name="style.css" /&gt; &lt;h:graphicImage name="images/logo.png" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload