webtier@glassfish.java.net

Re: [webtier] TagException thrown for head, body, outputStylesheet

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Mon, 22 Feb 2010 11:20:27 -0500

On 2/22/10 6:53 AM, webtier_at_javadesktop.org wrote:
> Hi there,
>
> I have a simple web project I have created for myself and that works fine.

I started looking at the<h:outputStylesheet> tag but when I run the

application I receive the following:
>
> com.sun.facelets.tag.TagException: /main.xhtml @8,57<h:outputStylesheet>

> Same goes for<h:head>,<h:body> which have

> been available since jsf 1.x.

Thanks for taking the time to write up a mail. I appreciate it.

First, those tags *are* new in JSF2. Second, you have to make
sure to declare the h: namespace on every page that
uses it, regardless of if the page is a template, or template
client. Like this:


<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html">

Ed