SlideShare une entreprise Scribd logo
1  sur  12
 JSF 2 Hello World using Maven
 Java Server Faces (JSF) is a standard Java
framework for building user interfaces for Java
Web
applications. It combines an MVC design
approach with a standard component based UI
development framework.
 In this tutorial, we will create our first JSF 2
application using Maven. We will have a web page
with a text box and a submit button, so when the
user types a value inside the text field and click
the button, he will be forwarded to another page
that will display the submitted text field value.
 JavaServer Faces (JSF) is a Java-based web
application framework intended to simplify
development integration of web-based user
interfaces. JavaServer Faces is a standardized
display technology which was formalized in a
specification through the Java Community
Process.
 JSF technology is a framework for developing,
building server side User Interface Components and
using them in a web application.JSF technology is
based on the Model View Controller (MVC)
architecture for separating logic from presentation.
 What is MVC Design Pattern?
 MVC design pattern designs an application using
three separate modules:
 Module Description
 Model Carries Data and login
 View Shows User Interface
 ControllerHandles processing of an application.
 JSF Architecture
 A JSF application is similar to any other Java technology-based
web application; it runs in a Java servlet container, and contains
 JavaBeans components as models containing application-specific
functionality and data
 A custom tag library for representing event handlers and
validators
 A custom tag library for rendering UI components
 UI components represented as stateful objects on the server
 Server-side helper classes
 Validators, event handlers, and navigation handlers
 Application configuration resource file for configuring
application resources
 JSF application lifecycle consist of six phases which
are as follows
 Restore view phase
 Apply request values phase; process events
 Process validations phase; process events
 Update model values phase; process events
 Invoke application phase; process events
 Render response phase
 JSF begins the restore view phase as soon as a link or
a button is clicked and JSF receives a request.
 The JSF builds the view, wires event handlers and
validators to UI components and saves the view in the
FacesContext instance. The FacesContext instance
will now contains all the information required to
process a request.
 File : 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">
 <html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:h="http://java.sun.com/jsf/html">
 <h:body>
 <h1>JSF2-InputText-Example</h1>
 <h:form>
 Name: <h:inputText value="#{user.name}" />
 <h:commandButton action="welcome" value="Display my
name" />
 </h:form>
 </h:body>
 </html>
 File : welcome.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">
 <html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:h="http://java.sun.com/jsf/html">

 <h:body>
 <h3>
 Welcome <h:outputText value="#{user.name}" />!
 </h3>
 </h:body>
 </html>
 import javax.faces.bean.ManagedBean;

 @ManagedBean
 public class User {

 private String name;

 public String getName() {
 return name;
 }

 public void setName(String name) {
 this.name = name;
 }
 }
 Create a JSF page
 Create a page home.xhtml under webapp folder.
Update the code of home.xhtml as shown below.
 <!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">
 <head>
 <title>JSF Tutorial!</title>
 </head>
 <body>
 #{helloWorld.getMessage()}
 </body>
 </html>
Jsf 2

Contenu connexe

Tendances

Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
Rishu Mehra
 

Tendances (20)

What is MVC?
What is MVC?What is MVC?
What is MVC?
 
Jsp with mvc
Jsp with mvcJsp with mvc
Jsp with mvc
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Session 1
Session 1Session 1
Session 1
 
Mvc
MvcMvc
Mvc
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
Basics of asp.net mvc
Basics of asp.net mvc Basics of asp.net mvc
Basics of asp.net mvc
 
Php.Mvc Presentation
Php.Mvc PresentationPhp.Mvc Presentation
Php.Mvc Presentation
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End Frameworks
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Intro ASP MVC
Intro ASP MVCIntro ASP MVC
Intro ASP MVC
 
Just a View: An Introduction To Model-View-Controller Pattern
Just a View:  An Introduction To Model-View-Controller PatternJust a View:  An Introduction To Model-View-Controller Pattern
Just a View: An Introduction To Model-View-Controller Pattern
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 

En vedette

如何滅除痛苦
如何滅除痛苦如何滅除痛苦
如何滅除痛苦
宏 恆
 
Essential skills of a teacher
Essential skills of a teacherEssential skills of a teacher
Essential skills of a teacher
Tin Arevalo
 

En vedette (18)

Buyer presentation
Buyer presentationBuyer presentation
Buyer presentation
 
ETSY GUY FINAL
ETSY GUY FINALETSY GUY FINAL
ETSY GUY FINAL
 
Lutein plus
Lutein plusLutein plus
Lutein plus
 
Web search-metrics-tutorial-www2010-section-6of7-freshness
Web search-metrics-tutorial-www2010-section-6of7-freshnessWeb search-metrics-tutorial-www2010-section-6of7-freshness
Web search-metrics-tutorial-www2010-section-6of7-freshness
 
Flasirana voda
Flasirana vodaFlasirana voda
Flasirana voda
 
如何滅除痛苦
如何滅除痛苦如何滅除痛苦
如何滅除痛苦
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Spirulina chlorella plus
Spirulina chlorella plusSpirulina chlorella plus
Spirulina chlorella plus
 
20160821 a parábola do semeador
20160821 a parábola do semeador20160821 a parábola do semeador
20160821 a parábola do semeador
 
Zvit-vihovna
Zvit-vihovnaZvit-vihovna
Zvit-vihovna
 
Pseudo-addiction
Pseudo-addictionPseudo-addiction
Pseudo-addiction
 
Differently-abled Heroes of India; awarded by Limca book of records
Differently-abled Heroes of India; awarded by Limca book of recordsDifferently-abled Heroes of India; awarded by Limca book of records
Differently-abled Heroes of India; awarded by Limca book of records
 
Essential skills of a teacher
Essential skills of a teacherEssential skills of a teacher
Essential skills of a teacher
 
Harvard Business School: Why Companies Fail and How Their Founders Can Bounce...
Harvard Business School: Why Companies Fail and How Their Founders Can Bounce...Harvard Business School: Why Companies Fail and How Their Founders Can Bounce...
Harvard Business School: Why Companies Fail and How Their Founders Can Bounce...
 
Journalism: Guidelines and Steps in Page Designing
Journalism: Guidelines and Steps in Page Designing Journalism: Guidelines and Steps in Page Designing
Journalism: Guidelines and Steps in Page Designing
 
MATERI AQIDAH Mengurai Sombong
MATERI AQIDAH Mengurai SombongMATERI AQIDAH Mengurai Sombong
MATERI AQIDAH Mengurai Sombong
 
successful entrepreneurs of flipkart {sachin and binny bansal}
successful entrepreneurs of flipkart {sachin and binny bansal} successful entrepreneurs of flipkart {sachin and binny bansal}
successful entrepreneurs of flipkart {sachin and binny bansal}
 
leanIX - Networking Event Hamburg 22.2.2013
leanIX - Networking Event Hamburg 22.2.2013leanIX - Networking Event Hamburg 22.2.2013
leanIX - Networking Event Hamburg 22.2.2013
 

Similaire à Jsf 2

Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
Rajiv Gupta
 

Similaire à Jsf 2 (20)

Jsf
JsfJsf
Jsf
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
JSF basics
JSF basicsJSF basics
JSF basics
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Java server faces
Java server facesJava server faces
Java server faces
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Design patterns
Design patternsDesign patterns
Design patterns
 
JSF.pptx
JSF.pptxJSF.pptx
JSF.pptx
 
Vishnu(java)
Vishnu(java)Vishnu(java)
Vishnu(java)
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 
AK 5 JSF 21 july 2008
AK 5 JSF   21 july 2008AK 5 JSF   21 july 2008
AK 5 JSF 21 july 2008
 
AK 4 JSF
AK 4 JSFAK 4 JSF
AK 4 JSF
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
 
Building a Web-bridge for JADE agents
Building a Web-bridge for JADE agentsBuilding a Web-bridge for JADE agents
Building a Web-bridge for JADE agents
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 
Jsf
JsfJsf
Jsf
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 

Plus de Ramakrishna kapa

Plus de Ramakrishna kapa (20)

Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Batch processing
Batch processingBatch processing
Batch processing
 
Msmq connectivity
Msmq connectivityMsmq connectivity
Msmq connectivity
 
Scopes in mule
Scopes in muleScopes in mule
Scopes in mule
 
Data weave more operations
Data weave more operationsData weave more operations
Data weave more operations
 
Basic math operations using dataweave
Basic math operations using dataweaveBasic math operations using dataweave
Basic math operations using dataweave
 
Dataweave types operators
Dataweave types operatorsDataweave types operators
Dataweave types operators
 
Operators in mule dataweave
Operators in mule dataweaveOperators in mule dataweave
Operators in mule dataweave
 
Data weave in mule
Data weave in muleData weave in mule
Data weave in mule
 
Servicenow connector
Servicenow connectorServicenow connector
Servicenow connector
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
 
Choice flow control
Choice flow controlChoice flow control
Choice flow control
 
Message enricher example
Message enricher exampleMessage enricher example
Message enricher example
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
 
Anypoint connector basics
Anypoint connector basicsAnypoint connector basics
Anypoint connector basics
 
Mule global elements
Mule global elementsMule global elements
Mule global elements
 
Mule message structure and varibles scopes
Mule message structure and varibles scopesMule message structure and varibles scopes
Mule message structure and varibles scopes
 
How to create an api in mule
How to create an api in muleHow to create an api in mule
How to create an api in mule
 
Log4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexibleLog4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexible
 

Dernier

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Dernier (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

Jsf 2

  • 1.
  • 2.  JSF 2 Hello World using Maven  Java Server Faces (JSF) is a standard Java framework for building user interfaces for Java Web applications. It combines an MVC design approach with a standard component based UI development framework.  In this tutorial, we will create our first JSF 2 application using Maven. We will have a web page with a text box and a submit button, so when the user types a value inside the text field and click the button, he will be forwarded to another page that will display the submitted text field value.
  • 3.  JavaServer Faces (JSF) is a Java-based web application framework intended to simplify development integration of web-based user interfaces. JavaServer Faces is a standardized display technology which was formalized in a specification through the Java Community Process.
  • 4.  JSF technology is a framework for developing, building server side User Interface Components and using them in a web application.JSF technology is based on the Model View Controller (MVC) architecture for separating logic from presentation.  What is MVC Design Pattern?  MVC design pattern designs an application using three separate modules:  Module Description  Model Carries Data and login  View Shows User Interface  ControllerHandles processing of an application.
  • 5.  JSF Architecture  A JSF application is similar to any other Java technology-based web application; it runs in a Java servlet container, and contains  JavaBeans components as models containing application-specific functionality and data  A custom tag library for representing event handlers and validators  A custom tag library for rendering UI components  UI components represented as stateful objects on the server  Server-side helper classes  Validators, event handlers, and navigation handlers  Application configuration resource file for configuring application resources
  • 6.  JSF application lifecycle consist of six phases which are as follows  Restore view phase  Apply request values phase; process events  Process validations phase; process events  Update model values phase; process events  Invoke application phase; process events  Render response phase  JSF begins the restore view phase as soon as a link or a button is clicked and JSF receives a request.  The JSF builds the view, wires event handlers and validators to UI components and saves the view in the FacesContext instance. The FacesContext instance will now contains all the information required to process a request.
  • 7.
  • 8.  File : 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">  <html xmlns="http://www.w3.org/1999/xhtml"  xmlns:h="http://java.sun.com/jsf/html">  <h:body>  <h1>JSF2-InputText-Example</h1>  <h:form>  Name: <h:inputText value="#{user.name}" />  <h:commandButton action="welcome" value="Display my name" />  </h:form>  </h:body>  </html>
  • 9.  File : welcome.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">  <html xmlns="http://www.w3.org/1999/xhtml"  xmlns:h="http://java.sun.com/jsf/html">   <h:body>  <h3>  Welcome <h:outputText value="#{user.name}" />!  </h3>  </h:body>  </html>
  • 10.  import javax.faces.bean.ManagedBean;   @ManagedBean  public class User {   private String name;   public String getName() {  return name;  }   public void setName(String name) {  this.name = name;  }  }
  • 11.  Create a JSF page  Create a page home.xhtml under webapp folder. Update the code of home.xhtml as shown below.  <!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">  <head>  <title>JSF Tutorial!</title>  </head>  <body>  #{helloWorld.getMessage()}  </body>  </html>