Convert Seam2 example to eclipse project

Convert Seam example applications to eclipse Project

Project folder structure in seam 2. x examples is different than folder structure used by seam tools project.(Project created in eclipse using JBoss Tools).

Seam (JBoss) Tools  project:

  1. src/
    1. hot/
      1. <ALL-Action-classes>
      2. <other-classes-for-HOT-deployment>
      3. <empty file>
    2. main/
      1. <ALL-entity/model-classes>
      2. components.propeties
      3. import.sql (Database DDL and DML statements)
      5. security.drl
      6. <empty file>
      7. META-INF/
        • persistence.xml
  2. WebContent/
    1. css/
    2. img/
    3. META-INF/
      1. context.xml
    4. <All-xhtml-pages>
    5. <All-xhtml.xml-pages>
    6. WEB-INF/
      1. classes/
      2. web.xml
      3. component.xml
      4. faces-config.xml
      5. jboss-web.xml (only for JBoss AS)
      6. pages.xml
  4. <project_name>.launch

Convert “jboss-seam-jpa” example Application to eclipse (Seam) project.

1         Create new “Seam Web Project” à enter name of project “jboss-seam-jpa”

2         accept all details in above screen and press “Next” àNextàNext

3         Disable Library configuration for JSF capabilities (You need to copy all JAR’s manually to Tomcat’s LIB folder) àNext

4         Select (Or add new) JBoss Seam Runtime

  1. Deploy As :                          WAR
  2. Libraries:                             Copy library from Seam Runtime
  3. Database Type:                 Select HSQL
  4. Connection Profile:         create new Connection profile for HSQL DB
  5. DB Tables already exists in Database: FALSE
  6. Recreate Database tables and data on deploy : TRUE
  7. Package name(session):             org.jboss.seam.example.jpa
  8. Package name(Entity):                 org.jboss.seam.example.jpa
  9. Create Test Project:                      NO

5         Now click finish to generate Project

6         Now create new Package “org.jboss.seam.example.jpa” under source folder “src/main”

7         Delete auto-created “” from src/hot

8         Open <SEAM-HOME> /LIB folder, copy following files:


  1. hibernate-core.jar
  2. hibernate-annotations.jar
  3. hibernate-commons-annotations.jar
  4. hibernate-entitymanager.jar
  5. hibernate-search.jar
  6. lucene.jar (ONLY FOR SEAM VER = 2.2.2.FINAL)
  7. hibernate-validator.jar

JSF 1.2:

  1. jsf-api.jar
  2. jsf-impl.jar
  3. jsf-facelets.jar


  1. jta.jar
  2. persistence-api.jar
  3. ejb3-persistence.jar (used by hibernate+JPA)

Logging for Hibernate and Seam:

  1. log4j.jar
  2. slf4j-api.jar
  3. slf4j-log4j12.jar
  4. (for debug messages)

Database Driver

1    hsqldb.jar


  • drools-api.jar
  • drools-compiler.jar
  • drools-core.jar
  • drools-decisiontables.jar
  • drools-templates.jar

9         paste them all inside <TOMCAT-HOME>/LIB

10     Open <SEAM-HOME>/examples/jpa folder

11     open “src/org/jboss/seam/example/jpa” folder

12     Copy all java classes which ends with “Action”

13     inside eclipse goto src/hot/org/jboss/seam/example/jpa folder à delete existsing classes

14     inside eclipse, goto src/hot/org/jboss/seam/example/jpa folder à paste

15     copy remaining files from “src/org/jboss/seam/example/jpa” folder to src/main/org/jboss/seam/example/jpa folder

16     inside eclipse, delete all .xhtml and .xml files from WebContent folder, delete “css” , “img” & “layout” folders

17     Open “VIEW” folder of examples /jpa àcopy all files

18     inside eclipse, paste them all in “WebContent” folder (Overwrite duplicates)

19     Open “Resource-tomcat” folder from your examples/jpa

20     copy import.sql file

21     inside eclipseà paste it in src/main

22     Copy “persistence.xml” from resource-tomcat/META-INF to eclipse project’s src/main/META-INF

23     Copy “context.xml” from resource-tomcat/META-INF to eclipse project’s WebContent/META-INF

24     copy “WEB-INF” folder from resources-tomcat to eclipse project’s WebContent folder (Overwrite existsing WEB-INF)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s