Vishwanath Washimkar
Vishwanath Washimkar

Reputation: 384

Deploying JSF 1.2 based web application to JBoss EAP 7.0

I have a web application which is based on JSF 1.2 . The JSF jars are packed in the WAR library. We we try to deploy the war in JBoss EAP 7.0 , the war gets deployed successfully but the application does not run.

I found that JBoss EAP 7.0 does not support JSF 1.2 . My web application is not JSF 2.0 complaint. It will be great help if some body can list down steps to do so.

Thanks

Upvotes: 0

Views: 1826

Answers (2)

Reddymails
Reddymails

Reputation: 823

Actually this combination worked for me on EAP 7 version of JBOSS 7.1.5 servers. This way I was able to load jsf1.2 jars from my WEB-INF/lib folder rather than what was supplied by JBOSS 7.1.5. I had a EAR file which had the WAR file.

Web.xml:

 <context-param>  
        <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>  
        <param-value>true</param-value>  
 </context-param>  

In ear META-INF/jboss-deployment-structure.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
 <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
    <deployment>
        <exclusions>
            <module name="javax.faces.api" slot="main" />
            <module name="com.sun.jsf-impl" slot="main" />
        </exclusions>
    </deployment>


    <sub-deployment name="yourwarfilename.war">
        <exclusions>
            <module name="javax.faces.api" slot="main" />
            <module name="com.sun.jsf-impl" slot="main" />
        </exclusions>
    </sub-deployment>
</jboss-deployment-structure>

Upvotes: 1

awagenhoffer
awagenhoffer

Reputation: 271

Please try these steps:

  1. Add a deployment-structure.xml to your project (WEB-INF/jboss-deployment-structure.xml to the WAR or META-INF/jboss-deployment-structure.xml to the EAR) with the exclusions:

        <exclusions>
            <module name="javax.faces.api" slot="main" />
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="org.jboss.as.jsf-injection" slot="main" />
        </exclusions>
    
  2. Import all dependecies in pom.xml, what jsf need. Like that:

    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2-b19</version>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>1.2-b19</version>
    </dependency>
    <dependency>
        <groupId>com.sun.facelets</groupId>
        <artifactId>jsf-facelets</artifactId>
        <version>1.1.11</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.1.0</version>
    </dependency>
    

Upvotes: 1

Related Questions