Chapter 3. Directory Structure of the Generated Project

In this chapter we describe where the Seam wizard puts the generated files for both EAR and WAR deployments.

The Seam Project wizard generates projects like Eclipse WTP style in order to utilize Eclipse WTP features and to have a correct classpath. To be more precise it generates one project per artifact.

3.1. WAR Deployment

The project layout for WAR projects is:

Project Layout for WAR projects

Figure 3.1. Project Layout for WAR projects


A WAR project can only use Seam JavaBean and JPA Entity bean components; it cannot use EJB3 Session beans etc.

WAR projects are generated to enable Seam 1.2.1 war hotdeploy feature. Classes put into src/action will be deployed to WEB-INF/dev from which Seam 1.2.1 automatically will perform hotdeploy of new components.

Note:

Because of Eclipse WTP limits the hot deployed classes also existed in WEB-INF/classes, but since Seam gives WEB-INF/dev precedence it will work.

Furthermore the Seam Project wizard generates a test project that is setup to run TestNG directly against the proper libraries and server runtime libraries. When the TestNG plugin is installed you can just run your tests via Run As > TestNG Test.

3.2. EAR Deployment

The project layout for EAR projects is:

Project Layout for WAR projects

Figure 3.2. Project Layout for WAR projects


An EAR project can use the whole range of Seam components, including EJB3 Session beans.