在XHTML页面中使用http://xmlns.jcp.org/jsf/html时,"URI未注册"

dar*_*kat 5 java intellij-idea maven jsf-2

pom.xml文件

<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-impl</artifactId>
    <version>2.2.0-m08</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-api</artifactId>
    <version>2.2.0-m08</version>
    <scope>provided</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)

xhtml文件

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
Run Code Online (Sandbox Code Playgroud)

web.xml文件

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
 </servlet-mapping>
Run Code Online (Sandbox Code Playgroud)

始终" http://xmlns.jcp.org/jsf/html "以红色显示,并显示"URI未注册".我需要知道,为什么会这样说以及如何解决它.任何人都有任何想法?

我正在使用Intellij IDEA和maven进行构建项目.

Eve*_*0id -1

在 Intellij IDEA 社区版中编写基于 jsf 的应用程序时,我遇到了同样的问题。只有终极版才支持jsf。