无法识别PrimeFaces标签 [英] PrimeFaces tags not recognised
问题描述
我是JSF和Primefaces的新手,并创建了一个包含JSF2.0,Glassfish v3.0和Jdk 6.0的项目.现在,我想使用Primefaces标记代替JSF标记. 我已经下载了primefaces-3.5.jar并将其添加到WEB-INF/lib文件夹中,并且可以很好地识别到我的* .xhtml页面中.
I am new to JSF and Primefaces and have created a project with JSF2.0, Glassfish v3.0 and Jdk 6.0.Now want to use Primefaces tags instead of JSF tags. I have downloaded primefaces-3.5.jar and added it into WEB-INF/lib folder and it well recognized into my *.xhtml pages.
但是,当我尝试运行该应用程序时,它无法识别PrimeFaces标记. 例如: 如果我插入:
But when I try to run the application it does not recognizes the PrimeFaces tags. for Example: if I insert:
<p:inputText id="username" validator="#{regBean.username}" required="true" requiredMessage="Please enter Username"/>
代替:
<h:inputText id="username" value="#{regBean.username}" required="true" requiredMessage="Please enter Username!"/>
它不显示Web应用程序中的输入框. 我是否需要在web.xml文件中包含任何配置详细信息? 请提出建议!
it does not show the input box in the Web Application. Do I need to include any configuration details in web.xml file? please suggest!!
推荐答案
尝试类似
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h:form>
<p:editor></p:editor>
</h:form>
</h:body>
</html>
还要确保您的路径中有primefaces.jar.
这篇关于无法识别PrimeFaces标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!