Hi, I try to access sample.xhtml page from the following in Jboss server 7.1.1 with Testing JSF 2.0 features, but the page is display empty or blank screen. I dont see any error in log file. Pl check attached sample.xhtml and template.xhtml. I didnt understand whats exactly is happening. let me know
<?
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 lang=
"en"
"http://www.w3.org/1999/xhtml"
"http://java.sun.com/jsf/html"
"http://java.sun.com/jsf/facelets"
"http://java.sun.com/jsf/core"
>
<ui:composition template="template.xhtml"
>
<ui:define name="content"
>
<h:messages
/>
<h:outputText value="hello"
/>
</ui:define
> </
ui:composition
> </
html
>
==================================================================
Below is the template.xhtml which will be referenced from above sample.xhtml
<!
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"
"http://java.sun.com/jsf/facelets"
"http://java.sun.com/jsf/html"
>
<!-- The template for our app, defines some regions -->
<
head
> <
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/> <
title>greeter template</title
> <
ui:insert name="head"
/> </
head
>
<
body
>
<div id="container"
>
<div id="header"></div
>
<div id="sidebar"></div
>
<div id="content"
>
<ui:insert name="content"
/>
</div
>
<br style="clear: both"
/>
</div
>
</
body
> </
html
>
Thanks,
Sree
is faces-config.xml set up correctly? do you see output from a page without templates?
If so, what if you copy&paste the example from http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/ into your project?