SeamFramework.orgCommunity Documentation
Most features of Seam Servlet are installed automatically by including the seam-servlet.jar and seam-servlet-api.jar in the web application library folder. If you are using Maven as your build tool, you can add the following single dependency to your pom.xml file:
<dependency>
<groupId>org.jboss.seam.servlet</groupId>
<artifactId>seam-servlet-impl</artifactId>
<version>${seam.servlet.version}</version>
</dependency>
Substitute the expression ${seam.servlet.version} with the most recent or appropriate version of Seam Servlet.
Alternatively, you can assign the version number to the property of the same name inside the
properties
element of your pom.xml.
In a Servlet 3.0 or Java EE 6 environment, your configuration is now complete.
If you are using Servlet 2.5 or Java EE 5, then you need to manually register several Servlet components in your application's web.xml to activate the features provided by this module:
<listener>
<listener-class>org.jboss.seam.servlet.event.ServletEventBridgeListener</listener-class>
</listener>
<filter>
<filter-name>Servlet Event Bridge Filter</filter-name>
<filter-class>org.jboss.seam.servlet.event.ServletEventBridgeFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Servlet Event Bridge Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>Catch Exception Filter</filter-name>
<filter-class>org.jboss.seam.servlet.filter.CatchExceptionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Catch Exception Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
You're now ready to dive into the Servlet enhancements provided for you by the Seam Servlet module!