Contents

 About the Author

 About the Technical Reviewers

 Acknowledgments

 Introduction

images Chapter 1: Introduction to Servlets

1-1. Setting Up a Java Enterprise Environment

Problem

Solution

How It Works

1-2. Developing a Servlet

Problem

Solution

How It Works

1-3. Packaging, Compiling, and Deploying a Servlet

Problem

Solution

How It Works

1-4. Registering Servlets Without WEB-XML

Problem

Solution

How It Works

1-5. Displaying Dynamic Content with a Servlet

Problem

Solution

How It Works

1-6. Handling Requests and Responses

Problem

Solution

How It Works

1-7. Listening for Servlet Container Events

Problem

Solution

How It Works

1-8. Setting Initialization Parameters

Problem

Solution #1

Solution #2

How It Works

1-9. Filtering Web Requests

Problem

Solution

How It Works

1-10. Listening for Attribute Changes

Problem

Solution

How It Works

1-11. Applying a Listener to a Session

Problem

Solution

How It Works

1-12. Managing Session Attributes

Problem

Solution

How It Works

1-13. Downloading a File

Problem

Solution

How It Works

1-14. Dispatching Requests

Problem

Solution

How It Works

1-15. Redirecting to a Different Site

Problem

Solution

How It Works

1-16. Securely Maintaining State Within the Browser

Problem

Solution

How It Works

1-17. Finalizing Servlet Tasks

Problem

Solution

How It Works

1-18. Reading and Writing with Nonblocking I/O

Problem

Solution

How It Works

images Chapter 2: JavaServer Pages

2-1. Creating a Simple JSP Page

Problem

Solution

How It Works

2-2. Embedding Java into a JSP Page

Problem

Solution

How It Works

2-3. Separating Business Logic from View Code

Problem

Solution

How It Works

2-4. Yielding or Setting Values

Problem

Solution

How It Works

2-5. Invoking a Function in a Conditional Expression

Problem

Solution

How It Works

2-6. Creating a JSP Document

Problem

Solution

How It Works

2-7. Embedding Expressions in EL

Problem

Solution

How It Works

2-8. Accessing Parameters in Multiple Pages

Problem

Solution

How It Works

2-9. Creating a Custom JSP Tag

Problem

Solution

How It Works

2-10. Including Other JSPs into a Page

Problem

Solution

How It Works

2-11. Creating an Input Form for a Database Record

Problem

Solution

How It Works

2-12. Looping Through Database Records Within a Page

Problem

Solution

How It Works

2-13. Handling JSP Errors

Problem

Solution

How It Works

2-14. Disabling Scriptlets in Pages

Problem

Solution

How It Works

2-15. Ignoring EL in Pages

Problem

Solution #1

Solution #2

Solution #3

How It Works

images Chapter 3: The Basics of JavaServer Faces

3-1. Writing a Simple JSF Application

Problem

Solution #1

Solution #2

How It Works

3-2. Writing a Managed Bean

Problem

Solution

How It Works

3-3. Building Sophisticated JSF Views with Components

Problem

Solution

How It Works

3-4. Displaying Messages in JSF Pages

Problem

Solution

How It Works

3-5. Navigation Based Upon Conditions

Problem

Solution

How It Works

3-6. Updating Messages Without Recompiling

Problem

Solution

How It Works

3-7. Validating User Input

Problem

Solution

How It Works

3-8. Evaluation of Page Expressions Immediately

Problem

Solution

How It Works

3-9. Passing Page Parameters to Methods

Problem

Solution

How It Works

3-10. Arithmetic and Reserved Words in Expressions

Problem

Solution

How It Works

3-11. Creating Bookmarkable URLs

Problem

Solution

How It Works

3-12. Displaying Lists of Objects

Problem

Solution

How It Works

3-13. Invoking Managed Bean Actions on Life-Cycle Phase Events

Problem

Solution

How It Works

images Chapter 4: Facelets

4-1. Creating a Page Template

Problem

Solution

How It Works

4-2. Applying a Template to Your Views

Problem

Solution

How It Works

4-3. Ensuring Resource Availability from All Views

Problem

Solution

How It Works

4-4. Creating Reusable Templates That Act As Components

Problem

Solution

How It Works

4-5. Handling Variable-Length Data on a Page

Problem

Solution

How It Works

4-6. Debugging View Content

Problem

Solution

How It Works

4-7. Writing a Custom Resolver for Locating Facelets Templates and Resources

Problem

Solution

How It Works

images Chapter 5: JavaServer Faces Standard Components

Component and Tag Primer

Common Component Tag Attributes

Common JavaScript Component Tags

Binding Components to Properties

5-1. Creating an Input Form

Problem

Solution

How It Works

5-2. Invoking Actions from Within a Page

Problem

Solution

How It Works

5-3. Displaying Output

Problem

Solution

How It Works

5-4. Adding Form Validation

Problem

Solution #1

Solution #2

Solution #3

How It Works

5-5. Adding Select Lists to Pages

Problem

Solution

How It Works

5-6. Adding Graphics to Your Pages

Problem

Solution

How It Works

5-7. Adding Check Boxes to a View

Problem

Solution

How It Works

5-8. Adding Radio Buttons to a View

Problem

Solution

How It Works

5-9. Structuring View Layout

Problem

Solution

How It Works

5-10. Displaying a Collection of Data

Problem

Solution

How It Works

5-11. Utilizing Custom JSF Component Libraries

Problem

Solution

How It Works

5-12. Implementing File Uploading

Problem

Solution

How It Works

images Chapter 6: Advanced JavaServer Faces and Ajax

6-1. Validating Input with Ajax

Problem

Solution

How It Works

6-2. Submitting Pages Without Page Reloads

Problem

Solution

How It Works

6-3. Making Partial-Page Updates

Problem

Solution

How It Works

6-4. Applying Ajax Functionality to a Group of Components

Problem

Solution

How It Works

6-5. Custom Processing of Ajax Functionality

Problem

Solution

How It Works

6-6. Custom Conversion of Input Values

Problem

Solution

How It Works

6-7. Maintaining Managed Bean Scopes for a Session

Problem

Solution

How It Works

6-8. Listening for System-Level Events

Problem

Solution

How It Works

6-9. Listening for Component Events

Problem

Solution

How It Works

6-10. Invoking a Managed Bean Action on Render

Problem

Solution

How It Works

6-11. Asynchronously Updating Components

Problem

Solution

How It Works

6-12. Developing JSF Components Containing HTML5

Problem

Solution

How It Works

6-13. Listening to JSF Phases

Problem

Solution

How It Works

6-14. Adding Autocompletion to Text Fields

Problem

Solution

How It Works

6-15. Developing Custom Constraint Annotations

Problem

Solution

How It Works

6-16. Customizing Data Tables

Problem

Solution

How It Works

6-17. Developing a Page Flow

Problem

Solution

How It Works

6-18. Constructing a JSF View in Pure HTML5

Problem

Solution

How It Works

images Chapter 7: JDBC

7-1. Obtaining Database Drivers and Adding Them to the CLASSPATH

Problem

Solution

How It Works

7-2. Connecting to a Database

Problem

Solution #1

Solution #2

How It Works

7-3. Handling Database Connection Exceptions

Problem

Solution

How It Works

7-4. Simplifying Connection Management

Problem

Solution

How It Works

7-5. Querying a Database

Problem

Solution

How It Works

7-6. Performing CRUD Operations

Problem

Solution

How It Works

7-7. Preventing SQL Injection

Problem

Solution

How It Works

7-8. Utilizing Java Objects for Database Access

Problem

Solution

How It Works

7-9. Displaying Database Results in JSF Views

Problem

Solution

How It Works

7-10. Navigating Data with Scrollable ResultSets

Problem

Solution

How It Works

7-11. Calling PL/SQL Stored Procedures

Problem

Solution

How It Works

7-12. Querying and Storing Large Objects

Problem

Solution

How It Works

7-13. Caching Data for Use When Disconnected

Problem

Solution

How It Works

7-14. Joining RowSet Objects When Not Connected to the Data Source

Problem

Solution

How It Works

images Chapter 8: Object-Relational Mapping

8-1. Creating an Entity

Problem

Solution

How It Works

8-2. Mapping Data Types

Problem

Solution

How It Works

8-3. Creating a Persistence Unit

Problem

Solution

How It Works

8-4. Using Database Sequences to Create Primary Key Values

Problem

Solution

How It Works

8-5. Generating Primary Keys with More Than One Attribute

Problem

Solution #1

Solution #2

How It Works

8-6. Defining a One-to-One Relationship

Problem

Solution

How It Works

8-7. Defining One-to-Many and Many-to-One Relationships

Problem

Solution

How It Works

8-8. Defining a Many-to-Many Relationship

Problem

Solution

How It Works

8-9. Querying with Named Queries

Problem

Solution

How It Works

8-10. Performing Validation on Entity Fields

Problem

Solution

How It Works

8-11. Generating Database Schema Objects Automatically

Problem

Solution

How It Works

images Chapter 9: Enterprise JavaBeans

9-1. Obtaining an Entity Manager

Problem

Solution #1

Solution #2

How It Works

9-2. Developing a Stateless Session Bean

Problem

Solution #1

Solution #2

How It Works

9-3. Developing a Stateful Session Bean

Problem

Solution

How It Works

9-4. Utilizing Session Beans with JSF

Problem

Solution #1

Solution #2

How It Works

9-5. Persisting an Object

Problem

Solution

How It Works

9-6. Updating an Object

Problem

Solution

How It Works

9-7. Returning a Table Model

Problem

Solution #1

Solution #2

How It Works

9-8. Creating a Singleton Bean

Problem

Solution

How It Works

9-9. Scheduling a Timer Service

Problem

Solution #1

Solution #2

How It Works

9-10. Performing Optional Transaction Life-Cycle Callbacks

Problem

Solution

How It Works

9-11. Ensuring a Stateful Session Bean Is Not Passivated

Problem

Solution

How It Works

9-12. Denoting Local and Remote Interfaces

Problem

Solution

How It Works

9-13. Processing Messages Asynchronously from Enterprise Beans

Problem

Solution

How It Works

images Chapter 10: The Query API and JPQL

10-1. Querying All Instances of an Entity

Problem

Solution #1

Solution #2

How It Works

10-2. Setting Parameters to Filter Query Results

Problem

Solution

How It Works

10-3. Returning a Single Object

Problem

Solution

How It Works

10-4. Creating Native Queries

Problem

Solution #1

Solution #2

How It Works

10-5. Querying More Than One Entity

Problem

Solution #1

Solution #2

How It Works

10-6. Calling JPQL Aggregate Functions

Problem

Solution

How It Works

10-7. Invoking Database Stored Procedures Natively

Problem

Solution

How It Works

10-8. Joining to Retrieve Instances Matching All Cases

Problem

Solution

How It Works

10-9. Joining to Retrieve All Rows Regardless of Match

Problem

Solution

How It Works

10-10. Applying JPQL Functional Expressions

Problem

Solution

How It Works

10-11. Forcing Query Execution Rather Than Cache Use

Problem

Solution

How It Works

10-12. Performing Bulk Updates and Deletes

Problem

Solution

How It Works

10-13. Retrieving Entity Subclasses

Problem

Solution

How It Works

10-14. Joining with ON Conditions

Problem

Solution

How It Works

images Chapter 11: Oracle's GlassFish

11-1. Installing the GlassFish Application Server

Problem

Solution #1

Solution #2

How It Works

11-2. Logging into the Administrative Console

Problem

Solution

How It Works

11-3. Changing the Administrator User Password

Problem

Solution #1

Solution #2

How It Works

11-4. Deploying a WAR File

Problem

Solution #1

Solution #2

How It Works

11-5. Adding a Database Resource

Problem

Solution

How It Works

11-6. Adding Forms-Based Authentication

Problem

Solution

How It Works

11-7. Configuring and Using JavaMail

Problem

Solution

How It Works

images Chapter 12: Contexts and Dependency Injection

12-1. Injecting a Bean or Other Object

Problem

Solution

How It Works

12-2. Binding a Bean to JSF Views

Problem

Solution #1

Solution #2

How It Works

12-3. Allocating a Specific Bean for Injection

Problem

Solution

How It Works

12-4. Determining Scope of a Bean

Problem

Solution

How It Works

12-5. Injecting Non-bean Objects

Problem

Solution #1

How It Works

12-6. Ignoring Classes

Problem

Solution #1

Solution #2

How It Works

12-7. Disposing of Producer Fields

Problem

Solution

How It Works

12-8. Specifying an Alternative Implementation at Deployment Time

Problem

Solution

How It Works

12-9. Injecting Bean Metadata

Problem

Solution

How It Works

images Chapter 13: Java Message Service

13-1. Creating JMS Resources

Problem

Solution #1

Solution #2

How It Works

13-2. Creating a Session

Problem

Solution

How It Works

13-3. Creating and Sending a Message

Problem

Solution #1

Solution #2

How It Works

13-4. Receiving Messages

Problem

Solution #1

Solution #2

How It Works

13-5. Filtering Messages

Problem

Solution

How It Works

13-6. Inspecting Message Queues

Problem

Solution

How It Works

13-7. Creating Durable Message Subscribers

Problem

Solution

How It Works

13-8. Delaying Message Delivery

Problem

Solution

How it Works

images Chapter 14: Authentication and Security

14-1. Setting Up Application Users and Groups in GlassFish

Problem

Solution

How It Works

14-2. Performing Basic Web Application Authentication

Problem

Solution

Solution #2

How It Works

14-3. Developing a Programmatic Login Form

Problem

Solution

How It Works

14-4. Managing Page Access Within a JSF Application

Problem

Solution

How It Works

14-5. Configuring LDAP Authentication Within GlassFish

Problem

Solution

How It Works

14-6. Configuring Custom Security Certificates Within GlassFish

Problem

Solution

How It Works

images Chapter 15: Java Web Services

15-1. Creating a JAX-WS Web Service Endpoint

Problem

Solution #1

Solution #2

How It Works

15-2. Deploying a JAX-WS Web Service

Problem

Solution #1

Solution #2

Solution #3

How It Works

15-3. Consuming a JAX-WS Web Service via WSDL

Problem

Solution

How It Works

15-4. Consuming a JAX-WS Web Service via a Stand-Alone Application Client

Problem

Solution

How It Works

15-5. Integrating Web Services into a Java EE Project

Problem

Solution

How It Works

15-6. Developing a RESTful Web Service

Problem

Solution #1

Solution #2

How It Works

15-7. Consuming and Producing with REST

Problem

Solution

How It Works

15-8. Writing a JAX-RS Client

Problem

Solution

How It Works

15-9. Filtering Requests and Responses

Problem

Solution

How It Works

15-10. Processing Long-Running Operations Asynchronously

Problem

Solution

How It Works

images Chapter 16: Enterprise Solutions Using Alternative Programming Languages

16-1. Developing Servlets with Groovy

Problem

Solution

How It Works

16-2. Working with Groovy Servlet Parameters

Problem

Solution

How It Works

16-3. Developing Servlets with Jython

Problem

Solution

How It Works

images Chapter 17: WebSockets and JSON-P

17-1. Creating a WebSocket Endpoint

Problem

Solution

How It Works

17-2. Sending Messages to a WebSocket Endpoint

Problem

Solution

How It Works

17-3. Building a JSON Object

Problem

Solution

How It Works

17-4. Writing a JSON Object to Disk

Problem

Solution

How It Works

17-5. Reading JSON from an Input Source

Problem

Solution

How It Works

images Chapter 18: JavaFX in the Enterprise

18-1. Developing a Basic JavaFX Application

Problem

Solution

How It Works

18-2. Incorporating Databases into a JavaFX Application

Problem

Solution

How It Works

18-3. Constructing a Sophisticated UI Containing EJB Data

Problem

Solution

How It Works

18-4. Developing an Enterprise Application Using MVC

Problem

Solution

How It Works

18-5. Incorporating REST Services into JavaFX Applications

Problem

Solution

How It Works

images Chapter 19: Concurrency and Batch Applications

19-1. Creating Resources for Processing Tasks Asynchronously in an Application Server

Problem

Solution #1

Solution #2

How It Works

19-2. Configuring and Creating a Reporter Task

Problem

Solution

How It Works

19-3. Running More Than One Task Concurrently

Problem

Solution

How It Works

19-4. Utilizing Transactions Within a Task

Problem

Solution

How It Works

19-5. Running Concurrent Tasks at Scheduled Times

Problem

Solution

How It Works

19-6. Creating Thread Instances

Problem

Solution

How It Works

19-7. Creating an Item-Oriented Batch Process

Problem

Solution

How It Works

images Appendix A: Java EE Development with NetBeans IDE

A-1. Configuring Application Servers Within NetBeans

Developing Java Enterprise Applications

A-2. Creating a NetBeans Java Web Project

A-3. Creating JSF Application Files

A-4. Developing EJB Entity Classes

A-5. JPQL

A-6. HTML5

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.201.217