title: What can cause "jsf is not defined" error in browser console
body: <p>Hi I got a simple fresh project based on MyFaces 2.0.11 with Primefaces 3.0 on Tomcat 6</p>
  
  <p>When I'm trying to navigate to a page I'm getting <code>Uncaught ReferenceError: jsf is not defined</code> error which directs me to a ref in my js code <code>jsf.ajax.addOnEvent</code> ... (which is reasonable cause I'm trying to use the jsf.js and it's not event present I'm my page..)</p>
  
  <p>And if I do view source of my page I dont the the include of the <code>jsf.js</code> file</p>
  
  <p>Now if I add it manually like this </p>
  
  <p><code>&lt;h:outputScript name="jsf.js" library="javax.faces" target="head"/&gt;</code> </p>
  
  <p>every thing works just fine... but I prefer not to include it manually , Instead I would like to know what are the reasons that can cause the lack of the jsf.js in my page</p>
  
  <p>I google for a while and none of the similar case represents mine</p>
  
  <p>I do have <code>&lt;h:head&gt;</code> and <code>&lt;h:body&gt;</code> My page is really simple...</p>
  
  <p>Any Ideas?</p>