users@glassfish-samples.java.net

Problem with JSF/Facelets h:head and h:body tags not defined in jsf-api.jar andn jsf-impl.jar

From: John Raven <jraven_at_xtra.co.nz>
Date: Wed, 15 Sep 2010 08:35:19 +1200

Hi,

I have tried posting this on the web tier forum at www.dev.java.net but got
no response.

I have been trying to use a JSP page that uses the h:head and h:body tags.
The container I am using is GlassFish V3. The application deploys but when
the JSP is compiled into XHTML the following error occurs:
org.apache.jasper.JasperException: /index.jsp(3,0) PWC6142: No tag "head"
defined in tag library imported with prefix "h".

I have tried replacing jsf-api.jar and jsf-impl.jar in the appserver with
the latest versions of jars like Mojarra and myfaces but no success.
The JSF2.0 spec says these tags should be there. The Java EE 6 tutorial
singlepdf version p. 166 refers to:
http://download.oracle.com/javaee/6/javaserverfaces/2.0/docs/pdldocs/facelet
s/ which does not have the h:head and h:body functions but does have ui:
functions.

The Mojarra jars come with examples that use both h:body and h:head tags.
The Apache tag library documentation
(http://myfaces.apache.org/core20/myfaces-impl/tlddoc-facelets/index.html)sa
ys the body and head tags should be there. However this does not correspond
with the taglib documentation that gets downloaded with
myfaces-api-2.0.1.jar and myfaces-impl-2.0.1.jar which does not include the
head and body tags.

I have also tried, because it was quicker, to add libraries to the build
path in Eclipse and see what it prompts me when I type ‘<h:’. I can some of
the tags but not the h:head and h:body nor the ui: tags for facelets.

Can anyone please tell me where I can download jar that has these tags.
There must be some somewhere there are several examples from different
sources that use these tags.

Cheers,
John Raven