1 Reply Latest reply on Sep 17, 2012 1:28 AM by Nicklas Karlsson

    Seeing Blank Page from accessing JSF 2.0 ( sample.xhtml) page

    Sree . Newbie

       

      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"

       

      xmlns=

      "http://www.w3.org/1999/xhtml"

       

      xmlns:h=

      "http://java.sun.com/jsf/html"

       

      xmlns:ui=

      "http://java.sun.com/jsf/facelets"

       

      xmlns:f=

      "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"

       

      xmlns:ui=

      "http://java.sun.com/jsf/facelets"

       

      xmlns:h=

      "http://java.sun.com/jsf/html"

       

      xmlns:f="http://java.sun.com/jsf/core"

      >

       

      <!-- 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