Seam 2.x Web Development

Seam 2.x Web Development
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 25%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Develop rich web applications using Seam 2.x, Facelets, and RichFaces and deploy them on the JBoss Application Server
  • Integrate standard technologies like JSF, Facelets, EJB, and JPA with Seam and build on them using additional Seam components
  • Informative and practical approach to development with fully working examples and source code for each chapter of the book

Book Details

Language : English
Paperback : 300 pages [ 235mm x 191mm ]
Release Date : April 2009
ISBN : 184719592X
ISBN 13 : 9781847195920
Author(s) : David Salter
Topics and Technologies : All Books, Web Development, Java, Open Source, Web Development

Table of Contents

Chapter 1: Introduction to Seam
Chapter 2: Developing Seam Applications
Chapter 3: Seam Page Flow
Chapter 4: Facelets
Chapter 5: Testing Seam Applications
Chapter 6: RichFaces
Chapter 7: Database Persistence
Chapter 8: Seam Conversations
Chapter 9: Seam and AJAX
Chapter 10: Security
Chapter 11: Enterprise Features
Appendix: JBoss Tools
  • Chapter 1: Introduction to Seam
    • What is Seam?
    • Why use Seam?
    • Seam requirements
    • Installing JBoss Application Server
    • Starting the JBoss Application Server
    • Installing Seam
    • Testing our Seam installation
      • Start the JBoss Application Server
      • Deploy the sample application
      • Run the sample application
    • Summary
  • Chapter 2: Developing Seam Applications
    • Seam application architecture
    • Seam components
    • Object Injection and Outjection
    • Example application
      • WAR file deployment descriptors
      • EAR file deployment descriptors
      • Application layout
      • Testing the application
      • Building and deploying the application
    • Seam data validation
      • Data validation
      • The JSF messages collection
    • Building and testing the validating Seam calculator
    • Summary
  • Chapter 3: Seam Page Flow
    • Simple navigation
    • Seam style navigation
      • Defining a page flow in pages.xml
        • <page> element
        • <navigation> element
        • <rule> element
      • Error handling
      • Executing code before rendering pages
    • A working example
      • <s:selectItems/> and <s:convertEnum />
      • Rendering the options in the sample application
      • Running the sample application
    • Seam jPDL navigation
    • Summary
  • Chapter 4: Facelets
    • What is Facelets?
    • Why Facelets? Why not JSP?
      • Templating
        • Template parameters
      • Performance
      • EL functions
      • XHTML
      • No scriptlets
    • Obtaining and installing Facelets
    • Configuring a web application for Facelets
      • Changes in the web.xml file
      • Changes in the faces-config.xml file
      • Example Facelets files from the previous chapter
    • SeamGen
    • Creating the Vacation Planner application using SeamGen
    • Seam debug page
    • Summary
  • Chapter 5: Testing Seam Applications
    • Overview of Seam application testing
    • TestNG
    • Component testing
    • Testing the user interface
    • Seam component testing
    • Mocking Seam components
    • Summary
  • Chapter 6: RichFaces
    • Obtaining RichFaces
    • Configuring an application for RichFaces
      • Add JAR files to the web application
      • Configuring the application's XML resources
    • RichFaces controls
      • <rich:calendar />
        • JavaScript methods
      • <rich:panel />
        • JavaScript methods
    • <rich:modalPanel />
      • JavaScript methods
    • <rich:simpleTogglePanel />
      • JavaScript methods
    • <rich:fileUpload />
      • JavaScript methods
    • <rich:gmap />
      • JavaScript methods
    • <rich:dataTable />
      • JavaScript methods
  • Summary
  • Chapter 7: Database Persistence
    • Overview of database persistence
    • How SeamGen helps with persistence
    • Persisting Java entities to the database
    • Retrieving Java entities from the database
    • Integrating Java entities with Facelets
    • Relationships between entities
      • One-to-one relationships
      • One-to-many and many-to-one relationships
      • Many-to-many relationships
    • Performing CRUD operations on entities
    • The Seam application framework
      • Home objects
        • Accessing home objects from Facelets
        • XML definition of home objects
      • Query objects
        • Accessing query objects from Facelets
        • XML definition of query objects
    • Summary
  • Chapter 8: Seam Conversations
    • Component scope
      • Local variables
      • HTTP session data
      • Global variables
    • Seam component scope
      • Defining the scope of a Seam component
    • What are conversations?
      • Starting a conversation
        • Automatically starting a conversation when a page is viewed
      • Ending a conversation
        • Automatically ending a conversation when a page is viewed
      • Propagating conversations between Windows
      • Propagating conversations
      • Viewing conversations
    • Conversation configuration
      • Conversation parameter
      • Conversation timeout
      • Concurrent request timeout
    • Natural conversations
      • Setting up a natural conversation
    • Summary
  • Chapter 9: Seam and AJAX
    • What is AJAX?
    • AJAX and the Seam Framework
    • Configuring Seam applications for Seam Remoting
      • Configuring Seam Remoting server side
      • Configuring Seam Remoting client side
      • Invoking Seam components via Remoting
      • Debugging Seam Remoting
        • The org.jboss.seam.remoting.remoting component
        • The <remoting:remoting> component
      • Logging
      • Changing the Please wait message
    • AJAX4JSF
      • Configuring an application for AJAX4JSF
      • AJAX4JSF tags
        • <a4j:commandButton />
        • <a4j:commandLink />
        • <a4j:poll />
    • Summary
  • Chapter 10: Security
    • User authentication
      • Security authenticator
        • Persisting user information
        • Creating an authenticator
        • Securing web pages
        • Creating a logon form
        • Redirecting to the requested page after login
    • User roles
      • Implement a role class
      • Add required Seam annotations
      • Assign a set of roles to a user
      • Restricting user interface access via roles
    • Auditing security events
    • CAPTCHAs
    • The Seam identity manager API
      • Creating a user with the identity manager
      • Specifying security rules
      • Defining security roles with rules
    • OpenID
      • Configuring a Seam web application to support OpenID
      • Configure an OpenID phase listener
      • Ensure that the correct JAR files are on the application's classpath
      • Write a Logon form
      • Configure page redirection after an OpenID logon
      • The OpenID logon process
    • Summary
  • Chapter 11: Enterprise Features
    • Internationalization
      • Defining the application languages
      • Write application-specific strings
      • Display language-specific strings
      • Dynamically changing the localization
      • Persisting the localization settings
      • SeamGen support for localization
      • Displaying Hibernate Validator messages
    • URL rewriting
      • Enabling URL rewriting
    • Seam events
      • Raising events
        • Raising events with @RaiseEvent
        • Raising events with org.jboss.seam.core.Events
      • Observing events
    • PDF document generation
      • PDF required configuration
      • Generating PDFs
        • <p:document />
        • <p:paragraph />
        • <p:text />
        • <p:font />
        • <p:table /> and <p:cell />
        • <p:html />
    • Email
      • Configuring the SMTP settings
      • Writing an email template
        • <m:from />
        • <m:to />
        • <m:subject />
        • <m:body />
        • <m:attachment />
      • Sending an email
    • The future of Seam
    • Summary
  • Appendix: JBoss Tools
    • Overview of JBoss Tools
    • Installing JBoss Tools
    • Creating Seam projects
    • Managing Seam projects
      • JSP / Facelet editor
      • Pages.xml editor
      • Components.xml editor
    • Running Seam projects
    • Summary

David Salter

David Salter is an enterprise software developer who has been developing software professionally since 1991. His relationship with Java goes right back to the beginning, using Java 1.0 to write desktop applications and applets for interactive websites.

David has been developing Enterprise Java applications using both the Java EE standards and open source solutions for the last 10 years.

David is the co-author of Building SOA-based Composite Applications using NetBeans and the author of Seam 2.x Web Development.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Seam 2.x Web Development +    Oracle 11g R1 / R2 Real Application Clusters Handbook =
50% Off
the second eBook
Price for both: $59.60

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Understand the fundamentals of Seam and why Seam is different from many other web frameworks
  • Develop web applications using the Facelets viewing technology as an advanced replacement for JSF
  • Test all aspects of a Seam application including testing web pages and Seam components
  • Utilize the RichFaces library for developing advanced, rich user interfaces including AJAX technologies for an improved user experience
  • Develop persistent applications using the Java Persistence API (JPA)
  • Build conversational web applications that can run over multiple browser windows and tabs without worrying about storing session data
  • Secure applications using role-based security, CAPTCHA, and OpenId
  • Easily use Facelets to render data as HTML/PDF/RTF/email
  • Use JBoss Tools to rapidly enhance your developer productivity

In Detail

The Seam framework from JBoss allows developers to use JSF, Facelets, EJB, and JPA to write conversational web applications. But you will first have to learn how these standard technologies are integrated using Seam and how they can be built upon using additional Seam components. If you need to build a Java web application fast, but don't have time to learn all these complex features, then this book is for you.

The book provides a practical approach to developing Seam applications highlighting good development practices. It provides a complete walk through to develop Web applications using Seam, Facelets, and RichFaces and explains how to deploy them to the JBoss Application Server. You can start using key aspects of the Seam framework immediately because this book builds on them chapter by chapter, finally ending with details of enterprise functionality such as PDF report generation and event frameworks.

First, the book introduces you to the fundamentals of Seam applications, describing topics such as Injection, Outjection and Bijection. You will understand the Facelets framework, AJAX, database persistence, and advanced Seam concepts through the many examples in the book.

The book takes a practical approach throughout to describing the technologies and tools involved. You will add functionality to Seam applications after you learn how to use the Seam Generator RAD tools and how to customize and fully test application functionality. Hints and tips are provided along the way of how to use Seam and the JBoss Application Server.

Build robust web applications with Seam, Facelets, and RichFaces using the JBoss application server


Having developed enterprise Java applications since 2001, the author's experience enables him to provide a clear incremental approach to web development with Seam. Initially the book introduces Seam using Java Server Pages (JSP) as the view technology so that readers can quickly learn the key concepts behind Seam. Additional technologies used within Seam applications are then introduced chapter by chapter with each chapter building on the material previously learned. The book describes each technology, providing working examples and source code for each.

This is not a dry Seam reference book, but an exciting journey learning Seam, starting at the basics and progressing by the end of the book to more advanced enterprise features.

Who this book is for

This book is for Java EE application developers who are new to Seam and interested in developing with Seam 2.x.

You will need a basic understanding of Java EE and also to be aware of EJB3, although you do not need to know it in any detail. Experience with JBoss AS would be great, but all you really need is to be comfortable using any application server. Knowledge of AJAX and JavaScript would also be beneficial, although it is not necessary.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software