Eclipse - 找不到 uri http://java.sun.com/jsf/html 的 facelet 标记库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6594482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html
提问by Stephan
In my index.xhtml
, I have a namespace defined like this xmlns:h="http://java.sun.com/jsf/html"
. The server at this url indicates that the page cannot be found.
在 my 中index.xhtml
,我有一个像这样定义的命名空间xmlns:h="http://java.sun.com/jsf/html"
。此 url 处的服务器指示无法找到该页面。
Do you know where the page has moved ?
你知道页面移动到哪里了吗?
Eclipse Info
日食信息
Version: Indigo Release Build id: 20110615-0604
采纳答案by Stephan
For solving this problem this is what I did :
为了解决这个问题,这就是我所做的:
1. Close the eclipse project 2. Open the eclipse project 3. Right click on the project 4. Click on Validate => The (false) warnings are gone.
回答by BalusC
The XML taglib namespace URI does not point to a real web resource or something. It just points to the same value as the <namespace>
entry of the .taglib.xml
file of the XML taglib in question in the runtime classpath, which in case of JSF taglibs (and lot others) justhappens to be a HTTP URL. In case of Mojarra, you can find the declaration in the /com/sun/faces/metadata/taglib/html_basic.taglib.xml
file of the jsf-impl.jar
file.
XML taglib 命名空间 URI 并不指向真正的 Web 资源或其他东西。它只是指向相同的值<namespace>
在进入.taglib.xml
的XML标签库的文件中的问题在运行时类路径,这在JSF标签库(和很多其他人)的情况下,只是恰巧是一个HTTP URL。在 Mojarra 的情况下,您可以在/com/sun/faces/metadata/taglib/html_basic.taglib.xml
文件的jsf-impl.jar
文件中找到声明。
If you're encountering problems with referencing JSF HTML tags, then the cause lies somewhere else.
如果您在引用 JSF HTML 标签时遇到问题,那么原因就在其他地方。
回答by Dhananjay
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
jsf-api.jar and jsf-impl.jar jar in your lib.
jsf-api.jar 和 jsf-impl.jar jar 在你的库中。
回答by Sarz
Previous answers were useful to me. Here I provide an alternative way for solving this issue. I fixed this problem by adding the jar primefaces-[version].jar
to the WEB-INF/lib
directory.
以前的答案对我有用。在这里,我提供了一种解决此问题的替代方法。我通过将 jar 添加primefaces-[version].jar
到WEB-INF/lib
目录中解决了这个问题。