简体   繁体   English

Primefaces 3.3,POM,tomcat 7.0.39和Jboss作为EAP 5.1

[英]Primefaces 3.3, POM, tomcat 7.0.39 and Jboss as EAP 5.1

I'm working with primefaces 3.3 and JSF 2.0. 我正在使用primefaces 3.3和JSF 2.0。 And the structure of the pom below, when I generate a war, run (work) only on tomcat 7.0.39. 而下面的pom的结构,当我发动战争时,只能在Tomcat 7.0.39上运行(工作)。 I would like to know what I need to change the pom for the war also run in the JBoss EAP 5.1. 我想知道在JBoss EAP 5.1中也需要改变战争的pom。

Error:19:19:53,125 SEVERE [config] Critical error during deployment: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.ExternalContextFactory' was not configured properly. 错误:19:19:53,125严重[config]部署期间的严重错误:com.sun.faces.config.ConfigurationException:未正确配置工厂'javax.faces.context.ExternalContextFactory'。 at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:305) at 在com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:305)处

  • O war generated below does not work in the JBoss EAP 5.1 下面生成的O war在JBoss EAP 5.1中不起作用
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.mkyong.core</groupId>
<artifactId>OtimizacaoProcessoInterno</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>

<name>OtimizacaoProcessoInterno</name>
<url>http://maven.apache.org</url>

<dependencies>

    <!-- PrimeFaces -->
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>3.3</version>
    </dependency>

    <!-- JSF -->
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.1.11</version>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.1.11</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.1</version>
    </dependency>

    <!-- EL -->
    <dependency>
        <groupId>org.glassfish.web</groupId>
        <artifactId>el-impl</artifactId>
        <version>2.2</version>
    </dependency>

</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <configuration>
               <wtpversion>2.0</wtpversion>
            </configuration>
        </plugin>
    </plugins>
</build>

You could package your maven module as ear. 您可以将maven模块打包为ear。 Thus change your packaging to 因此,将包装更改为

<packaging>ear</packaging>

If you want to customize your ear file, you can use the maven-ear-plugin . 如果要自定义您的耳朵文件,可以使用maven-ear-plugin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM