tags:

views:

131

answers:

1

Hello,

I am following this tutorial :-

http://blogs.sun.com/enterprisetechtips/entry/true_abstraction_composite_ui_components

But it's not working for me.

This is my index.xhtml :-

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ez="http://java.sun.com/jsf/composite/simpleout"&gt;
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
         <ez:loginPanel>

         </ez:loginPanel>
    </h:body>
</html>

This is my out.xhtml which is in WEB-INF/resources/simpleout

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite"&gt;
<head>
<title>This will not be present in rendered output</title>
</head>
<body>

<composite:interface>
    <composite:attribute name="value" required="false"/>
</composite:interface>

<composite:implementation>
    <h:outputText value="#{cc.attrs.value}" style="background-color: yellow"/>
</composite:implementation>
</body>
</html>

I always get this error :-

•Warning: This page calls for XML namespace http://java.sun.com/jsf/composite/simpleout declared with prefix ez but no taglibrary exists for that namespace. 

Please help me.

Thanks in advance:)

+1  A: 

Composite components do belong into a directory resources in the web root, not under WEB-INF. Everything else seems to be correct. In my opinion putting resources under WEB-INF would make more sense since should not be accessible by a browser, but that seems to be what the spec says.

Jörn Horstmann