Skip to main content

TagException thrown for head, body, outputStylesheet

4 replies [Last post]
petrov_smolenskaya
Offline
Joined: 2007-11-30

Hi there,

I have a simple web project I have created for myself and that works fine. I started looking at the tag but when I run the application I receive the following:

com.sun.facelets.tag.TagException: /main.xhtml @8,57 Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: outputStylesheet. Same goes for , which have been available since jsf 1.x. I have looked at a few jsf 2.0 examples but cannot see what I am doing wrong, or lib mis match.

The libs I am using are as follows:

com.sun.faces
jsf-impl
2.0.2

com.sun.faces
jsf-api
2.0.2

com.sun.facelets
jsf-facelets
1.1.15

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
petrov_smolenskaya
Offline
Joined: 2007-11-30

Hi Ed,

Thanks for the response. I do have those namespaces defined. Admittedly richfaces 3.3.3.CR1 is also in the mix, but I don't think that should cause any issues for the default tags.

xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">













Ed Burns

On 2/22/10 6:53 AM, webtier@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 tag but when I run the

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

> Same goes for, 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:

xmlns:h="http://java.sun.com/jsf/html">

Ed

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Lincoln Baxter, III

Third, if you are using JSF2, you don't need to include facelets anymore
because it is built in ;)

On Mon, Feb 22, 2010 at 5:20 PM, Ed Burns wrote:

> On 2/22/10 6:53 AM, webtier@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 tag but when I run the
>
> application I receive the following:
>
>>
>> com.sun.facelets.tag.TagException: /main.xhtml @8,57
>>
>
> Same goes for, 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:
>
>
> > xmlns:h="http://java.sun.com/jsf/html">
>
> Ed
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
[att1.html]

petrov_smolenskaya
Offline
Joined: 2007-11-30

Hi Lincoln,

Thanks I think I see my issue. I'm re-using most of the web.xml that came with the richfaces example app. In there it has the com.sun.facelets.FaceletViewHandler for the parameter org.ajax4jsf.VIEW_HANDLERS. Previously I was seeing a ClassDefNotFoundException when I tried removing the jsf-facelets jar. The jsf-impl-2.0.2-b10.jar does not have that view handler, so I probably should not have that param defined in web.xml

I think you have put me on the right track. Many thanks :-)