1

我正在尝试使用 Netbeans IDE 为我的 JSF 应用程序添加 primefaces。在 xhtml 页面中添加 primefaces 的命名空间时,我面临的错误是“没有为命名空间 xmlns:p="http://primefaces.org/ui" 找到库。

我的环境设置 JDK 1.7、Maven 3.0.4、Tomcat 7、Primefaces 3.3、Netbeans IDE、JSF 2.1.2

在 pom.xml 中,我将 primefaces repo 和依赖项添加为

<repositories>
        <repository>
            <id>prime-repo</id>
            <name>Prime Repo</name>
            <url>http://repository.primefaces.org</url>
        </repository>
    </repositories>



    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>3.3</version>
    </dependency>

我还尝试更改此 [博客] 中指定的命名空间

xmlns:p="http://primefaces.prime.com.tr/ui"

它总是不起作用。

任何帮助将不胜感激。提前致谢。

4

2 回答 2

3

将 primefaces-p.taglib.xml 从 primefaces.jar 依赖项中的 META-INF 复制到 Web 模块中的 META-INF:

我的项目中的示例

于 2020-02-10T04:45:49.630 回答
2

NetBeans 中存在一个问题,此处描述并在 7.4 版中修复。在这种情况下,应用程序部署到 Tomcat 服务器后,错误应该会消失。

(发布只是为了将解决方案建议排除在评论之外。)

于 2013-10-21T17:43:51.947 回答