0

I'm create mycomponent.xhtml in the root of Web Pages directory. In mycomponent.xhtml i describe some composite component

<?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">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface/>
    <composite:implementation>
        ...
    </composite:implementation>
</html>

Now i'm creating facelet index.html in the root of Web Pages directory. But i cannot use mycomponent

<?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">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:mycomp="http://java.sun.com/jsf/composite">
         <mycomp:mycomponent/>      <!--Error, the component library composite does not contain mycomponent-->
</html>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

1 Answers1

1

The composite component page (mycomponemt.xhtml) that you placed at the root must be located at /resources/mycomp folder: see composite components documentation for details.

You can find a kickoff example in Oracle's Java EE tutorial. Another one can be found in our composite component tag wiki.

Community
  • 1
  • 1
skuntsel
  • 11,624
  • 11
  • 44
  • 67
  • Another one can be found in our tag wiki http://stackoverflow.com/tags/composite-component/info – BalusC Nov 30 '13 at 01:09