Configuring Seam in Java EE 5
If you're running in a Java EE 5 environment, this is all the configuration required to start using Seam!
Once you've packaged all this stuff together into an EAR, the archive structure will look something like this:
my-application.ear/
jboss-seam.jar
el-api.jar
el-ri.jar
META-INF/
MANIFEST.MF
application.xml
my-application.war/
META-INF/
MANIFEST.MF
WEB-INF/
web.xml
components.xml
faces-config.xml
lib/
jsf-facelets.jar
jboss-seam-ui.jar
login.jsp
register.jsp
...
my-application.jar/
META-INF/
MANIFEST.MF
persistence.xml
seam.properties
org/
jboss/
myapplication/
User.class
Login.class
LoginBean.class
Register.class
RegisterBean.class
...
You must include jboss-seam.jar
, el-api.jar
and el-ri.jar
in the EAR classpath. Make sure you reference all of these jars from application.xml
.
If you want to use jBPM or Drools, you must include the needed jars in the EAR classpath. Make sure you reference all of the jars from application.xml
.
If you want to use facelets (our recommendation), you must include jsf-facelets.jar
in the WEB-INF/lib
directory of the WAR.
If you want to use the Seam tag library (most Seam applications do), you must include jboss-seam-ui.jar
in the WEB-INF/lib
directory of the WAR. If you want to use the PDF or email tag libraries, you need to put jboss-seam-pdf.jar
or jboss-seam-mail.jar
in WEB-INF/lib
.
If you want to use the Seam debug page (only works for applications using facelets), you must include jboss-seam-debug.jar
in the WEB-INF/lib
directory of the WAR.
Seam ships with several example applications that are deployable in any Java EE container that supports EJB 3.0.
I really wish that was all there was to say on the topic of configuration but unfortunately we're only about a third of the way there. If you're too overwhelmed by all this tedious configuration stuff, feel free to skip over the rest of this section and come back to it later.