0%

Book Description

"

The complete guide to installing and configuring the GlassFish Application Server and developing Java EE 5 applications to be deployed to this server

  • Concise guide covering all major aspects of Java EE 5 development

  • Uses the enterprise open-source GlassFish application server

  • Explains GlassFish installation and configuration

  • Covers all major Java EE 5 APIs

In Detail

GlassFish is a free, open-source Java EE 5-compliant application server that is quickly gaining massive popularity.

This book explains GlassFish installation and configuration, and then moves on to Java EE 5 application development, covering all major Java EE 5 APIs.

Chapter 1 provides an overview of Glassfish, including how to install it, configure it, and verify the installation.

Chapter 2 covers how to develop server-side web applications using the Servlet API.

Chapter 3 explains how to develop web applications using JavaServer Pages (JSPs), including how to develop and use JSP custom tags

Chapter 4 discusses how to develop Java EE applications that interact with a relational database system through the Java Persistence API (JPA) and through the Java Database Connectivity API (JDBC).

Chapter 5 explains how to use the JSP Standard Tag Library (JSTL) when developing JavaServer Pages

Chapter 6 covers how to develop applications using the JavaServer Faces (JSF) component framework to build web applications.

Chapter 7 explains how to develop messaging applications though the Java Messaging Service (JMS) API.

Chapter 8 covers securing J2EE applications through the Java Authentication and Authorization Service (JAAS).

Chapter 9 discusses how to develop Enterprise Java Beans that adhere to the EJB 3 specification.

Chapter 10 explains how to develop and deploy web services that conform to the JAX-WS 2.1 specification.

Chapter 11 covers frameworks that build on top of the Java EE 5 specification, including Seam, Facelets, and Ajax4Jsf.

The appendices cover some of the advanced features of the GlassFish server.

This book is a Developer’s Guide, covering the ins and outs of developing Java EE 5 applications deployed to the standards-compliant, high performance GlassFish application server.

"

Table of Contents

  1. Java EE 5 Development using GlassFish Application Server
  2. Credits
  3. About the Author
  4. About the Reviewers
  5. Preface
    1. What This Book Covers
    2. Who is This Book for
    3. Conventions
    4. Reader Feedback
    5. Customer Support
      1. Downloading the Example Code for the Book
      2. Errata
      3. Questions
  6. 1. Getting Started with GlassFish
    1. Overview of Java EE and GlassFish
      1. GlassFish Advantages
    2. Obtaining GlassFish
    3. Installing GlassFish
      1. GlassFish Dependencies
      2. Performing the Installation
    4. Verifying the Installation
      1. Deploying Our First Java EE Application
        1. Deploying an Application through the Web Console
        2. Undeploying an Application through the Web Console
        3. Deploying an Application through the Command Line
        4. Undeploying an Application through the Command Line
    5. GlassFish Domains Explained
      1. Creating Domains
      2. Deleting Domains
      3. Stopping a Domain
      4. Setting Up Database Connectivity
      5. Setting Up Connection Pools
      6. Setting Up Data Sources
    6. Summary
  7. 2. Servlet Development and Deployment
    1. Writing Our First Servlet
    2. Compiling the Servlet
    3. Configuring the Servlet
    4. Packaging the Web Application
    5. Deploying the Web Application
    6. Testing the Web Application
    7. Processing HTML Forms
    8. Request Forwarding and Response Redirection
      1. Request Forwarding
      2. Response Redirection
    9. Persisting Application Data across Requests
    10. Summary
  8. 3. JavaServer Pages
    1. Introduction to JavaServer Pages
    2. Developing Our First JSP
    3. JSP Implicit Objects
    4. JSPs and JavaBeans
      1. Reusing JSP Content
      2. JSP Custom Tags
      3. Extending SimpleTagSupport
      4. Using Tag Files to Create Custom JSP Tags
    5. Unified Expression Language
    6. Summary
  9. 4. Database Connectivity
    1. The CustomerDB Database
    2. JDBC
      1. Retrieving Data from a Database
      2. Modifying Database Data
      3. The Java Persistence API
    3. Entity Relationships
      1. One-to-One Relationships
        1. One-to-One Relationships
        2. One-to-Many Relationships
        3. Many-to-Many Relationships
      2. Composite Primary Keys
      3. Java Persistence Query Language
    4. Final Notes
    5. Summary
  10. 5. JSP Standard Tag Library
    1. Core JSTL Tag Library
    2. Formatting JSTL Tag Library
    3. SQL JSTL Tag Library
    4. XML JSTL Tag Library
    5. JSTL Functions
    6. Summary
  11. 6. JavaServer Faces
    1. Developing Our First JSF Application
    2. Custom Data Validation
      1. Creating Custom Validators
      2. Validator Methods
    3. Customizing JSF's Default Messages
      1. Customizing Message Styles
      2. Customizing Message Text
    4. Integrating JSF and JPA
      1. JSF Core Components
        1. <f:actionListener>
        2. <f:attribute>
        3. <f:convertDateTime>
        4. <f:convertNumber>
        5. <f:converter>
        6. <f:facet>
        7. <f:loadBundle>
        8. <f:param>
        9. <f:phaseListener>
        10. <f:selectItem>
        11. <f:selectItems>
        12. <f:setPropertyActionListener>
        13. <f:subview>
        14. <f:validateDoubleRange>
        15. <f:validateLength>
        16. <f:validateLongRange>
        17. <f:validator>
        18. <f:valueChangeListener>
        19. <f:verbatim>
        20. <f:view>
      2. JSF HTML Components
        1. <h:column>
        2. <h:commandButton>
        3. <h:commandLink>
        4. <h:dataTable>
        5. <h:form>
        6. <h:graphicImage>
        7. <h:inputHidden>
        8. <h:inputSecret>
        9. <h:inputText>
        10. <h:inputTextarea>
        11. <h:message>
        12. <h:messages>
        13. <h:outputFormat>
        14. <h:outputLabel>
        15. <h:outputLink>
        16. <h:outputText>
        17. <h:panelGrid>
        18. <h:panelGroup>
        19. <h:selectBooleanCheckbox>
        20. <h:selectManyCheckbox>
        21. <h:selectManyListbox>
        22. <h:selectManyMenu>
        23. <h:selectOneListbox>
        24. <h:selectOneMenu>
        25. <h:selectOneRadio>
      3. Additional JSF Tag Libraries
    5. Summary
  12. 7. Java Messaging Service
    1. Setting Up GlassFish for JMS
      1. Setting Up a JMS Connection Factory
      2. Setting Up a JMS Message Queue
      3. Setting Up a JMS Message Topic
    2. Message Queues
      1. Sending Messages to a Message Queue
      2. Retrieving Messages from a Message Queue
      3. Asynchronously Receiving Messages from a Message Queue
      4. Browsing Message Queues
    3. Message Topics
      1. Sending Messages to a Message Topic
      2. Receiving Messages from a Message Topic
      3. Creating Durable Subscribers
    4. Summary
  13. 8. Security
    1. Security Realms
      1. Predefined Security Realms
        1. admin-realm
        2. The file Realm
          1. File Realm Basic Authentication
        3. The certificate Realm
          1. Creating Self-Signed Certificates
          2. Configuring Applications to Use the Certificate Realm
      2. Defining Additional Realms
        1. Defining Additional File Realms
        2. Defining Additional Certificate Realms
        3. Defining an LDAP Realm
        4. Defining a Solaris Realm
        5. Defining a JDBC Realm
        6. Defining Custom Realms
    2. Summary
  14. 9. Enterprise JavaBeans
    1. Session Beans
      1. Simple Session Bean
      2. A More Realistic Example
      3. Invoking Session Beans from Web Applications
    2. Message-Driven Beans
    3. Transactions in Enterprise Java Beans
      1. Container-Managed Transactions
      2. Bean-Managed Transactions
    4. Enterprise JavaBean Life Cycles
      1. Stateful Session Bean Life Cycle
      2. Stateless Session Bean Life Cycle
      3. Message-Driven Bean Life Cycle
    5. EJB Timer Service
    6. EJB Security
      1. Client Authentication
    7. Summary
  15. 10. Web Services
    1. Developing Web Services with JAX-WS
      1. Developing a Web Service Client
        1. Developing a Web Service Client
      2. Sending Attachments to Web Services
      3. Exposing EJBs as Web Services
        1. EJB Web Service Clients
      4. Securing Web Services
      5. Securing EJB Web Services
    2. Summary
  16. 11. Beyond Java EE
    1. Facelets
      1. Downloading Facelets
      2. Configuring Our Facelets Application
      3. Writing a Facelets Application
      4. Facelets Templating
    2. Ajax4jsf
      1. Downloading Ajax4jsf
      2. Configuring Our JSF Application for Ajax4jsf
      3. Writing an AJAX-Enabled Application with Ajax4jsf
    3. Seam
      1. Downloading Seam
      2. Configuring a Seam Application
      3. Developing a Seam Application
    4. Summary
  17. A. Sending Email from Java EE Applications
    1. GlassFish Configuration
    2. Implementing Email Delivery Functionality
  18. B. IDE Integration
    1. NetBeans
    2. Eclipse
18.220.16.184