How to use primefaces with Jboss 7.1.3
Tech-Today

How to use primefaces with Jboss 7.1.3


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

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

Steps:
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">
<resources>
<resource-root path="primefaces-3.5.jar"/>
</resources>

<dependencies>
<module name="javax.faces.api" />
</dependencies>
</module>

2.) Add primefaces dependency to ejb/pom.xml
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.5</version>
</dependency>

3.) In web/pom.xml, exclude primefaces jar in ejb dependency:
<dependency>
<groupId>com.czetsuya</groupId>
<artifactId>xxx-ejb</artifactId>
<type>ejb</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
</exclusion>
</exclusions>
</dependency>

4.) Add jboss-deployment-structure.xml in ear/src/main/resources/META-INF:
<jboss-deployment-structure>
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>
the EAR's lib folder -->
<deployment>
<dependencies>
<module name="org.primefaces" />
<module name="javax.faces.api" />
</dependencies>
</deployment>
</jboss-deployment-structure>




- How To Use Mariadb And Liquibase Together With Maven On Jboss
First you must define the needed dependency in your pom file. <profile> <id>mariadb</id> <activation> <property> <name>env</name> <value>mariadb</value> </property> </activation> <properties>...

- Custom Application Context Or Name In Jboss Or Wildfly
As far as I know there are 3 ways to deploy an application in JBoss or Wildfly with a custom application context name. 1.) By adding jboss-web.xml in your web project WEB-INF folder; <?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"...

- How To Setup Seam3-security In Jboss 7
Recently, I've done some research on several Java Security Framework that can perform authentication, authorization and cryptography. I've worked with Apache Shiro, it's really good and complete but I've found several problems like there's...

- How To Automate Typing In Tinymce Using Selenium Java
Prerequisites:   1.) selenium-java   2.) selenium-firefox-driver   3.) selenium-chrome-driver   4.) chromedriver - http://code.google.com/p/chromedriver/downloads/list Currently I'm working on a a test case that needs to...

- How To Enable Jersey Rest Api In A Maven Web Project
This tutorial assumes that you already know how to create a maven project in eclipse. Steps: 1.) Create a new maven web project. (this assumes that you have maven plugin installed in your eclipse). 2.) In your META-INF/web.xml file make sure that you...



Tech-Today








.