Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html

不羁的心 提交于 2019-12-30 06:20:46

问题


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.

Do you know where the page has moved ?

Eclipse Info

Version: Indigo Release
Build id: 20110615-0604

回答1:


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.



回答2:


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

If you're encountering problems with referencing JSF HTML tags, then the cause lies somewhere else.




回答3:


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.




回答4:


<%@taglib   uri="http://java.sun.com/jsf/html" prefix="h"%>

jsf-api.jar and jsf-impl.jar jar in your lib.



来源:https://stackoverflow.com/questions/6594482/eclipse-cant-find-facelet-tag-library-for-uri-http-java-sun-com-jsf-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!