[英]Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html
In my index.xhtml
, I have a namespace defined like this xmlns:h="http://java.sun.com/jsf/html"
.在我的
index.xhtml
,我有一个像这样定义的名称空间xmlns:h="http://java.sun.com/jsf/html"
。 The server at this url indicates that the page cannot be found .位于此 url 的服务器指示无法找到该页面。
Do you know where the page has moved?你知道页面移动到哪里了吗?
Eclipse Info Eclipse 资料
Version: Indigo Release Build id: 20110615-0604
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.
The XML taglib namespace URI does not point to a real web resource or something. XML taglib 命名空间 URI 不指向真正的 web 资源或其他东西。 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) just happens to be a HTTP URL. 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) just happens 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.对于 Mojarra,您可以在
jsf-impl.jar
文件的/com/sun/faces/metadata/taglib/html_basic.taglib.xml
文件中找到声明。
If you're encountering problems with referencing JSF HTML tags, then the cause lies somewhere else.如果您在引用 JSF HTML 标签时遇到问题,那么原因就在其他地方。
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
目录来解决了这个问题。
<%@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 在您的库中。
Compare the Uri respective to the jsf version you are using.将 Uri 与您正在使用的 jsf 版本进行比较。
. The real JSTL 1.0 taglib uses the URI *http://java.sun.com/jstl/core.*
. The real JSTL 1.1/1.2 taglib uses the URI *http://java.sun.com/jsp/jstl/core*.
. Facelets 1.x uses the URI *http://java.sun.com/jstl/core.*
. Facelets 2.x uses the URI *http://java.sun.com/jsp/jstl/core.*
. Facelets 2.2+ uses the URI *http://xmlns.jcp.org/jsp/jstl/core.*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.