9

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
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Stephan
  • 41,764
  • 65
  • 238
  • 329

5 Answers5

16

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.
Stephan
  • 41,764
  • 65
  • 238
  • 329
  • This works for me only in situation when JSF implementation is on the project's classpath (API is not enough). Otherwise, error still exists. For details take a look at [this post](http://stackoverflow.com/a/25402146/1037316). – G. Demecki Aug 20 '14 at 10:18
  • This worked for me. So, why is this happening? Something wrong with the validator? – Durga Swaroop Jan 25 '16 at 07:18
  • @DurgaSwaroop I don't know. However, you can file an issue to Eclipse team. – Stephan Jan 25 '16 at 08:49
5

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • 2
    Actually I'm facing this problem : Description Resource NLS missing message: CANNOT_FIND_FACELET_TAGLIB in: org.eclipse.jst.jsf.core.validation.internal.facelet.messages index.xhtml (...) Facelet Validator – Stephan Jul 06 '11 at 10:02
  • 1
    That's a Glassfish/Eclipse specific issue. Try cleaning the project (*Project > Clean*). It's after all just an Eclipse project build warning. The code should run without trouble. Real JSF runtime errors are more of interest. – BalusC Jul 06 '11 at 10:06
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.

Sarz
  • 1,970
  • 4
  • 23
  • 43
1
<%@taglib   uri="http://java.sun.com/jsf/html" prefix="h"%>

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

Dhananjay
  • 734
  • 1
  • 9
  • 14
0

Compare the Uri respective to the jsf version you are using.

. 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.*
Debayan
  • 459
  • 4
  • 6