| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java EE 6 example source code file (home.xhtml)

This example Java EE 6 source code file (home.xhtml) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Java EE 6 tags/keywords

by, doctype, guess, guess, higher, higher, lower, lower, number, number, restartbutton, transitional//en, w3c//dtd, weld

The Java EE 6 home.xhtml source code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""

        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>JSF 2.0 Weld Example

       <h:form id="NumberGuessMain">
          <h:panelGrid styleClass="title-panel">
             <h:outputText value="Guess Number" styleClass="title-panel-text"/>
             <h:outputText value="Powered By JavaServer Faces 2.0 and Weld" styleClass="title-panel-subtext"/>

          <div style="color: black; font-size: 24px;">
             I'm thinking of a number between <span style="color: blue">#{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses.
          <h:panelGrid border="1" columns="5" style="font-size: 18px;">
             <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}" 
             <h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
             <h:commandButton id="RestartButton" value="Reset" action="#{game.reset}" immediate="true" />
             <h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}" style="color: red"/>
             <h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess and game.guess ne 0}" style="color: red"/>

          <div style="color: red; font-size: 14px;">
             <h:messages id="messages" globalOnly="false"/>

          <h:outputStylesheet name="stylesheet.css" />


Other Java EE 6 examples (source code examples)

Here is a short list of links related to this Java EE 6 home.xhtml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.