![](/img/trans.png)
[英]Can't find tag or library described for http://java.sun.com/jsp/jstl/core
[英]Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html
在我的index.xhtml
,我有一個像這樣定義的名稱空間xmlns:h="http://java.sun.com/jsf/html"
。 位於此 url 的服務器指示無法找到該頁面。
你知道頁面移動到哪里了嗎?
Eclipse 資料
Version: Indigo Release Build id: 20110615-0604
為了解決這個問題,這就是我所做的:
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.
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. 對於 Mojarra,您可以在jsf-impl.jar
文件的/com/sun/faces/metadata/taglib/html_basic.taglib.xml
文件中找到聲明。
如果您在引用 JSF HTML 標簽時遇到問題,那么原因就在其他地方。
以前的答案對我有用。 在這里,我提供了一種解決此問題的替代方法。 我通過將 jar primefaces-[version].jar
到WEB-INF/lib
目錄來解決了這個問題。
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
jsf-api.jar 和 jsf-impl.jar jar 在您的庫中。
將 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.