title: Uncaught ReferenceError: $ is not defined JSF Primefaces (h:head included)
body: <p>I have a simple JSF page displaying a text editor from primefaces (<a href="https://www.primefaces.org/showcase/ui/input/textEditor.xhtml" rel="nofollow noreferrer">Showcase</a>).
  <br/>However, the text editor is not displayed. When I inspect it (F12 in chrome), I see multiple errors, the first one is:</p>
  
  <pre><code>core.js.xhtml:2 Uncaught ReferenceError: $ is not defined
  at Object.resolveUserAgent (core.js.xhtml:2)
  at Object.init (core.js.xhtml:2)
  at core.js.xhtml:2
  </code></pre>
  
  <p>The others are Uncaught TypeError: Cannot read property '<em>Tag from Primefaces</em>' of undefined.</p>
  
  <p><br/><br/>
  I read those questions: <a href="https://stackoverflow.com/questions/16588126/uncaught-referenceerror-is-not-defined-in-jsf-primefaces">1</a> / <a href="https://stackoverflow.com/questions/14553417/primefaces-css-looknfeel-missing-and-js-uncaught-reference-error-primefaces">2</a>, but <strong>I do have a  <code>&lt;h:head&gt;</code></strong>.
  <br/>What am I missing?</p>
  
  <p>My page (index.xhtml):</p>
  
  <pre><code>&lt;h:html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:b="http://bootsfaces.net/ui"
  xmlns:p="http://primefaces.org/ui"  
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"&gt;
  &lt;h:head&gt;
      &lt;h:outputStylesheet library="css" name="style.css"  /&gt;
      &lt;h:outputScript library="js" name="script.js" /&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;p:textEditor value="#{textEditorController.text}" height="300" style="margin-bottom:10px"/&gt;
      &lt;p:commandButton value="Submit" action="#{textEditorController.submit}"/&gt;
  &lt;/h:body&gt;
  &lt;/h:html&gt;
  </code></pre>
  
  <p>My web.xml:</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://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"&gt;
    &lt;display-name&gt;MusiglabelWEB&lt;/display-name&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.PARTIAL_STATE_SAVING&lt;/param-name&gt;
      &lt;param-value&gt;false&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;facelets.SKIP_COMMENTS&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I use muliple projects (WEB, JPA, EJB, EAR), if that matters.</p>
  
  <p>Included Libraries in WEB Project:
  <li>Primefaces 6.1 (Downloaded <a href="https://github.com/primefaces/primefaces" rel="nofollow noreferrer">here</a>)</li>
  <li>Bootsfaces 1.1.1 (Downloaded <a href="https://github.com/TheCoder4eu/BootsFaces-OSP/releases" rel="nofollow noreferrer">here</a>)</p>