Looking for a JavaEE Architect or Potential Tech Co-Founder?
Please don't hesitate to contact me.

How to use primefaces with Jboss 7.1.3

This tutorial will teach us how to use primefaces with jboss 7.1.3.

 1.) primefaces 3.5
 2.) jboss 7.1.3
 3.) maven javaee6 generated project (ear, war, ejb)

1.) Add primefaces module in jboss.
  a.) In JBOSS_HOME/modules directory create org/primefaces/main folder.
  b.) Copy primefaces.jar to the folder that has just been created.
  c.) Create module.xml.
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.primefaces">
  <resource-root path="primefaces-3.5.jar"/>
  <module name="javax.faces.api" />

2.) Add primefaces dependency to ejb/pom.xml

3.) In web/pom.xml, exclude primefaces jar in ejb dependency:

4.) Add jboss-deployment-structure.xml in ear/src/main/resources/META-INF:
  the EAR's lib folder -->
   <module name="org.primefaces" />
   <module name="javax.faces.api" />
How to use primefaces with Jboss 7.1.3 How to use primefaces with Jboss 7.1.3 Reviewed by Edward Legaspi on Tuesday, May 07, 2013 Rating: 5


Anonymous said...

We do not have access to the jboss 7.1 server, is there a
way to do it within ear using depeencies in
deployment-structure.xml? Thanks

Edward Legaspi said...

Unfortunately, this procedure requires that you have access to your JBOSS module folder because it needs to create the primefaces module.

With primefaces dependency and without modifying the JBOSS module, I was not able to make ear deployment work. But it works fine in war, so if you don't have a problem with war try it.

eris nguyen said...

I have problem with primfaces when I added it to jboss 7.1. I could not deploy it. I tried your tutorial but I did not know where is pom.xml and where i had to create module.xml.
Can you use picture to perform your tutorial? please ?
thank you very much

Anonymous said...

it is possible to generate with maven jboss-deployment-structure.xml files to add under ear/src/main/resources/META-INF path ??
Thanks in advance.

Joseph said...
This comment has been removed by the author.
Powered by Blogger.