primefaces.org/ui无法解析 [英] primefaces.org/ui cannot be resolved

查看:131
本文介绍了primefaces.org/ui无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JSF和PrimeFaces的新手(也是stackoverflow的新手),并且遇到配置/部署问题.我正在使用PrimeFaces 5.0,Tomcat 7.0.55和JSF 2.2. JSF标记可以解析并正常工作,但PrimeFaces标记无法解析并出现此错误.

I am new to JSF and PrimeFaces (and new to stackoverflow) and am having a configuration/deployment problem. I am using PrimeFaces 5.0, Tomcat 7.0.55, and JSF 2.2. The JSF tags can be resolved and work, but the PrimeFaces tags are not resolved and give this error.

这是网页:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://primefaces.org/ui" prefix="p" %>
<f:loadBundle basename="resources/messages" var="msg"/>

<html>
    <head>
        <title>enter your name page</title>
    </head>
    <body>
        <f:view>
            <h1>
                <h:outputText value="#{msg.inputname_header}"/>
            </h1>
            <h:form id="helloForm">
                <h:outputText value="#{msg.prompt}"/>
                <h:inputText value="#{personBean.personName}" />
                <h:commandButton action="login" value="#{msg.button_text}" />
                <p:spinner />
            </h:form>
        </f:view>
    </body>
</html> 

错误消息是: org.apache.jasper.JasperException:绝对uri: http://primefaces.org/ui 无法解析web.xml或与此应用程序一起部署的jar文件

The error message is: org.apache.jasper.JasperException: The absolute uri: http://primefaces.org/ui cannot be resolved in either web.xml or the jar files deployed with this application

您的帮助将不胜感激

推荐答案

您正在使用JSP.自JSF 2.0(至今已将近5年前)开始弃用JSP.因此,与JSF 2.0兼容的组件库不再支持JSP. PrimeFaces就是这样的.从PrimeFaces 2.0开始,它就不支持JSP.

You're using JSP. JSP is deprecated since JSF 2.0 (at date, almost 5 years ago already). Therefore, JSF 2.0 compatible component libraries don't support JSP anymore. PrimeFaces is such one. Already since PrimeFaces 2.0 it didn't support JSP.

改为使用JSP的后继者 Facelets .

Use JSP's successor Facelets instead.

  • Java EE 7 tutorial - Facelets
  • How to use PrimeFaces 3.2 in Eclipse Indigo SR2?
  • Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?

这篇关于primefaces.org/ui无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆