我正在将普通项目转换为maven项目,因此配置有问题。
Maven 3接缝2.2Richface 3.3jsf 1.2jboss 6
eclipse警告信息:
视图处理程序引用了不实现接口javax.faces.application.ViewHandler 的"com.sun.facelets.FaceletViewHandler"
我添加了jsf-facelets和jsf-impl
faces-config.xml…
com.sun.facelets.FaceletViewHandler
消息资源_de_de
消息资源_en_US
错误消息Resource_de_de
de_de en_US<默认区域设置>-->
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>
尝试将其添加到您的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"。如果您仍然有问题,请查看此链接!