我四处搜索,但无法确定一个明确的解决方案。我正在使用 netbeans+Maven 并试图从 Primefaces 2.2.1 升级到 3.0.M3 - 当我将 index.xhtml taglib 更改为 xmlns:p="http://primefaces.org/ui" 时,netbeans 会抛出 '找不到此命名空间错误的库。
index.xhtml 文件是:
<?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:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui" >
<f:view contentType="text/html">
<h:head>
</h:head>
<h:body>
<h:form>
<h:commandButton value="Run Test" action="selecttype" />
<h:commandButton value="Manage Methods" action="addmethod" />
<h:commandButton value="Manage Data" action="managedata" />
<p:tagCloud model="#{tagCloudBean.model}" />
</h:form>
</h:body>
</f:view>
</html>
Run Code Online (Sandbox Code Playgroud)
所以新的 taglib 和 p:tagCloud 行是 netbeans 所说的不起作用 - 当我运行程序时,我看到消息上方的 3 个按钮“警告:此页面调用 XML 命名空间http://primefaces.org/ui声明为前缀 p 但该命名空间不存在标签库。”。 …