1. setup seam 3 + richfaces 4
1. Start eclipse
2. New -> Dynamic Web Project

3. copy the following files into WebContent/WEB-INF/lib
3.1 seam 3 dependent files
commons-beanutils-1.8.0.jar
commons-digester-2.1.jar
commons-logging-1.1.1.jar
joda-time-1.6.jar
picketlink-idm-api-1.5.0.Alpha02.jar
picketlink-idm-common-1.5.0.Alpha02.jar
picketlink-idm-core-1.5.0.Alpha02.jar
picketlink-idm-spi-1.5.0.Alpha02.jar
seam-catch-3.0.0.Final.jar
seam-config-xml-3.0.0.Final.jar
seam-faces-3.0.0.Final.jar
seam-international-3.0.0.Final.jar
seam-persistence-3.0.0.Final.jar
seam-security-3.0.0.Final.jar
seam-servlet-3.0.0.Final.jar
seam-solder-3.0.0.Final.jar
3.2 richfaces related files
cssparser-0.9.5.jar
guava-r09.jar
richfaces-components-api-4.0.0.Final.jar
richfaces-components-ui-4.0.0.Final.jar
richfaces-core-api-4.0.0.Final.jar
richfaces-core-impl-4.0.0.Final.jar
sac-1.3.jar
4. create web.xml on WebContent/WEB-INF directory
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Seam test</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
5. Add index.xhtml on WebContent directory
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich">
<f:view>
<h:head>
</h:head>
<h:body styleClass="page">
<h1>Seam 3 test</h1>
<rich:panel header="Richfaces running on JBoss AS 6">
<ul>
<li>RichFaces is a component library for JSF and an advanced framework</li>
<li>for easily integrating AJAX capabilities into business applications.</li>
</ul>
</rich:panel>
</h:body>
</f:view>
</html>
6. deploy it onto Jboss 6
7. http://localhost:8080/seam3-test/index.xhtml
2 comments:
Hi,
I am getting lot of errors for configuration.
Can you send me the urls to download the jar files, eclipse.
Do you know how to create the project using Seam command seagen for Seam 3.
This is really good example. Can you please provide article to use Seam 3, Richfaces 4 on tomcat without maven.
Thanking you.
Post a Comment