1

I am using Primefaces 3.3 with JSF 2.0 and I tried to include Jquery in my Facelet using

<h:outputScript library="primefaces" name="jquery/jquery.js"></h:outputScript>

However I am getting something like this when I view the source code.

<script type="text/javascript" src="RES_NOT_FOUND"></script>

I have searched in several posts over here itself and the best I found is the code I am using. So how can I do it ?

dShringi
  • 1,497
  • 2
  • 22
  • 36

1 Answers1

2

JQuery is already included on every page where you have primefaces components. No need to include again.

However if you need a version which differs from primefaces just put the script tag into your <h:head> like:

<h:head>
      <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
</h:head>

If you have to include script file from your resources see How to include JavaScript files by h:outputScript?

Community
  • 1
  • 1
Akos K
  • 7,071
  • 3
  • 33
  • 46