4

I tried setting up the PrimeFaces library. So i added the primefaces-3.4.1.jar using the 'add external jar' command. Than I added the namespace: xmlns:p="http://primefaces.org/ui to the html tag. According to the official documentation that is all there is to it, for setting it up.

I tried adding a <p:editor/> componenet to my page, but it is not displayed.

My project configuration is: Eclipse, JSF 2.1 on Glassfish 3.1

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
TheAptKid
  • 1,559
  • 3
  • 25
  • 47

3 Answers3

4

Apparently you did the "add external jar" command wrong. It's not clear from the question how exactly you performed this step, but this should be just a matter of dropping the JAR file in its entirety in the project's /WEB-INF/lib folder the usual way (as you would do for every 3rd party JAR file the webapp depends on). The way you put the question indicates that you weren't aware about this after all.

Really nothing more needs to be done. If you have fiddled around in project's Build Path properties, then you should undo that all to avoid possible collisions in the future. Eclipse is smart enough to set the necessary things automatically right whenever you drop a JAR in projects's /WEB-INF/lib folder.

See also:

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
3

I guess this is the same problem & solution: Simple primefaces application not working

missing servlet-mapping in web.xml:

<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Community
  • 1
  • 1
Josef
  • 219
  • 2
  • 5
  • This won't solve the problem when PrimeFaces JAR is in the wrong place. This only solves another problem which is already answered in https://stackoverflow.com/q/3112946 – BalusC Oct 20 '20 at 11:46
0

The PrimeFaces jar (primefaces-7.0.jar in my case) has to be available in the folder /WEB-INF/lib at runtime.

Ram Chhabra
  • 421
  • 8
  • 11