Version 8

    In JBoss AS 4.0.3 and 4.0.4, the JBoss Application Server features built-in Java Server Faces support.  The implementation used is Apache MyFaces version 1.1.0, which is JSF 1.1 certified.  The included build of MyFaces is built to work with Tomcat 5.5 that comes with JBoss AS 4.0.3.

     

    JBoss AS 4.0.5 was upgraded to use MyFaces 1.1.4.  This fixed several bugs, but introduced one new bug that can show up when running a JSF application as a portlet.  Here is a workaround for that bug.

     

    The MyFaces (tomahawk) extensions are not included with the JBoss distribution.

     

    Installing Your JSF Application

    JBossFaces allows you to install your JSF application without putting lots of extra JSF jar files in your WEB-INF/lib directory.  All that is required is that you put your application-specific class and jar files in the webapp and add the following to web.xml:

     

    <listener>      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener>

     

    Also, see the web.xml file attached to this page for optional context-params that can be set.

     

    If you don't remove the JSF RI libraries from your WEB-INF/lib then you might get strange errors like No faces context?!

     

    Using the MyFaces Tomahawk components

     

    If you want to use the Tomahawk component library with JSF, copy tomahawk.jar to the default/deploy/jbossweb-tomcat55.sar/jsf-libs directory, and add the following to default/deploy/jbossweb-tomcat55.sar/conf/web.xml:

     

    <init-param>    <description>Tomahawk tlds</description>    <param-name>tagLibJar1</param-name>    <param-value>jsf-libs/tomahawk.jar</param-value> </init-param>

     

    This section should on a default JBoss installation be inserted inside the servlet tag for org.apache.jasper.servlet.JspServlet.

     

    Fix for the all configuration in 4.0.3

    The all configuration has something missing from the all/deploy/jbossweb-tomcat5.5.sar/meta-inf/jboss-service.xml file.  If using the all configuration with JSF you should edit the value of the FilteredPackages attribute to make it look like this:

    <attribute name="FilteredPackages">javax.servlet,org.apache.commons.logging</attribute>

     

    Note that there should be no space on either side of the comma.  For more details on this issue, see http://jira.jboss.com/jira/browse/JBAS-2349.  This is fixed in JBoss  App Server 4.0.4.

     

    Using the JSF Reference Implementation

    To use the JSF Reference Implementation (Project Mojarra) instead of the bundled MyFaces implementation, simply delete the jbossweb-tomcat55.sar/jsf-lib directory.  Then, package the RI in your WEB-INF/lib directory as usual.

     

    Note: You may also need to delete temp directories such as server/default/tmp and server/default/work.

     

     

    Referenced by: