0

我正在将普通项目转换为maven项目,所以我的配置有问题。

Maven 3 Seam 2.2 Richface 3.3 jsf 1.2 jboss 6

日食的警告信息:

视图处理程序对未实现接口 javax.faces.application.ViewHandler 的“com.sun.facelets.FaceletViewHandler”的引用

我添加了 jsf-facelets 和 jsf-impl

面孔-config.xml ...


com.sun.facelets.FaceletViewHandler
MessageResource_de_DE
MessageResource_en_US
ErrorMessageResource_de_DE
de_DE en_US</default-locale> -->
en_US ...

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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">

    <parent>
        <groupId>de.openmind</groupId>
        <artifactId>openmind</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>openmind-war</artifactId>
    <packaging>war</packaging>
    <name>${project.artifactId} : ${project.version} WAR</name>

    ....
    ....

    <dependencies>
        <dependency>
            <groupId>de.openmind</groupId>
            <artifactId>openmind-ejb</artifactId>
            <type>ejb</type>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>jxl</artifactId>
                    <groupId>net.sourceforge.jexcelapi</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>de.openmind</groupId>
            <artifactId>openmind-datamodel</artifactId>
            <scope>provided</scope>
        </dependency> 

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam</artifactId>
            <scope>provided</scope>
            <type>ejb</type>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-ui</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>jboss-seam-jul</artifactId>
                    <groupId>org.jboss.seam</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-mail</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-debug</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-pdf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-remoting</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-excel</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>jxl</artifactId>
                    <groupId>net.sourceforge.jexcelapi</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
        </dependency>

        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-ui</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>richfaces-api</artifactId>
                    <groupId>org.richfaces.framework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-beanutils</artifactId>
                    <groupId>commons-beanutils</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>${app.context}</groupId>
            <artifactId>richfaces-impl</artifactId>
            <version>3.3.3.Final_FIXED</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.richfaces.framework</groupId>
                    <artifactId>richfaces-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${app.context}</groupId>
            <artifactId>tomahawk12</artifactId>
            <version>1.1.10FIXED</version>
        </dependency>

        <dependency>
            <groupId>apache-oro</groupId>
            <artifactId>jakarta-oro</artifactId>
            <version>2.0.8</version>
        </dependency>
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>commons-beanutils</artifactId>
                    <groupId>commons-beanutils</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
4

1 回答 1

0

尝试将其添加到您的 faces-config.xml 中:

<application> 
  <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> 
</application>

这对您的应用程序的 web.xml :

<context-param> 
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
  <param-value>.xhtml</param-value> 
</context-param>

您必须使用“.xthml”后缀访问您的网页。如果您仍有问题,请查看此链接!

于 2013-02-11T21:42:16.997 回答