Músico
JSF 2.0: Getting Started
Originals of Slides and Source Code for Examples:
http://www.coreservlets.com/JSF-Tutorial/jsf2/
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 1.x & JSF 2.0, Struts Classic & Struts 2, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.
Developed and taught by well-known author and developer. At public venues oronsite at your location.
© 2009 Marty Hall
For live training on JSF 1.x or 2.0, please see
courses at http://courses.coreservlets.com/.
htt
Taught by the author of Core Servlets and JSP, More
Servlets and JSP, and this tutorial. Available at public
Available
venues, or customized versions can be held on-site
at your organization.
• Courses developed and taught by Marty Hall
– Java 5,Java 6, intermediate/beginning servlets/JSP, advanced servlets/JSP, Struts, JSF, Ajax, GWT, custom courses.
Customized Java coreservlets.com experts (edited by Marty)
• Courses developed and taught by EE Training: http://courses.coreservlets.com/
Servlets, – Spring, Hibernate/JPA, 2.0, Struts Classic & Struts 2, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.
JSP, JSF 1.x & JSF EJB3, Ruby/RailsDeveloped and taught by well-known author@coreservlets.com for details or onsite at your location.
Contact hall and developer. At public venues
Topics in This Section
• Overview of JSF 2.0
• Required software
– Installing Java SE 6
– Installing Eclipse 3.5
– Installing a server for JSF 2.0
• Tomcat 6 (also needs jsf-api.jar and jsf-impl.jar) or
(also needs jsf
and jsf
or
•Glassfish 3
• Testing projects
– Importing and testing an existing JSF 2.0 project
• Deploying on Tomcat and Glassfish
– Making your own JSF 2.0 project
your own JSF
project
– Adding code to your JSF 2.0 project
4
• Summary of code in jsf-test project
© 2009 Marty Hall
Overview
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 1.x & JSF 2.0, StrutsClassic & Struts 2, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Overview of JSF 2.0
• JSF 2.0 adds many new features
–
–
–
–
–
–
–
–
–
Smart defaults
Annotations to replace many faces-config.xml entries
Ajax support
Integrated support for facelets
Simpler custom componentsMore components and validators
Support for Groovy
Ability to bookmark results pages
Lots more
more
• But, as of Fall 2009, JSF 2.0 was hard to test
– Simple installation and testing instructions hard to find
6
• Rectifying this is the main point of this section
thi
th
thi
• Next section gives a whirlwind tour of main new JSF 2 features
• Later sections give detailed tutorial onJSF 2.0
Software Needed: Summary
(Details in Later Sections)
(Details in Later Sections)
• To run on Tomcat 6
– Install Java
• Java 5 or later
– Install an IDE
• I use Eclipse 3.5
– Download Tomcat 6
• Or any server supporting
any server supporting
servlets 2.5
– Get JSF 2.0 JAR files
• jsf-api.jar, jsf-impl.jar
jsf
• Download from Project
Mojarra, put in WEBINF/lib folderof apps
– web.xml, faces-config.xml
7
• Required entries shown
later in tutorial
• To run on Glassfish 3
– Install Java
• Java 6 or later
– Install an IDE
• I use Eclipse 3.5
– Download Glassfish 3
• Or any server supporting
any server supporting
Java EE 6
– No extra JAR files needed
• Java EE 6 has built-in
EE has built
support for JSF 2.0
– web.xml,faces-config.xml
• Required entries shown
entries shown
later in tutorial
Fast Start for Experts
• If you already know how to use Tomcat and
Eclipse
– Grab jsf-test.zip from online link
• http://www.coreservlets.com/JSF-Tutorial/jsf2/
– Deploy to Tomcat
– Run http://localhost/jsf-test/
– Use jsf-test.zip as starting point for your own JSF 2.0
apps. App already has:
• The two needed JAR files...
Regístrate para leer el documento completo.