简体   繁体   中英

No library found for namespace xmlns:p=“http://primefaces.org/ui”

I am trying to add primefaces for my JSF application using Netbeans IDE. While adding the namespace for primefaces in xhtml page, i am facing the errors as "No library found for namespace xmlns:p="http://primefaces.org/ui".

My Environment setup JDK 1.7, Maven 3.0.4, Tomcat 7, Primefaces 3.3, Netbeans IDE, JSF 2.1.2

And in pom.xml, i have added the primefaces repo and dependency as

<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>

Also i have tried to change the namespace as specified in this [blog]

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

It was always not working.

Any help will be appreciated. Thanks in advance.

Copy primefaces-p.taglib.xml from META-INF in primefaces.jar dependency, to META-INF in your web module:

Example in my project

There's an issue in NetBeans, described here and fixed in version 7.4. In this case the error should be gone after application is deployed on Tomcat server.

(Posted just to keep the solution suggestions out of the comments.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM