- The Java EE 6 Tutorial (original) (raw)

Document Information

Preface

Part I Introduction

1. Overview

2. Using the Tutorial Examples

Part II The Web Tier

3. Getting Started with Web Applications

4. JavaServer Faces Technology

5. Introduction to Facelets

6. Expression Language

7. Using JavaServer Faces Technology in Web Pages

8. Using Converters, Listeners, and Validators

9. Developing with JavaServer Faces Technology

10. JavaServer Faces Technology: Advanced Concepts

11. Using Ajax with JavaServer Faces Technology

12. Composite Components: Advanced Topics and Example

13. Creating Custom UI Components and Other Custom Objects

14. Configuring JavaServer Faces Applications

15. Java Servlet Technology

16. Uploading Files with Java Servlet Technology

17. Internationalizing and Localizing Web Applications

Part III Web Services

18. Introduction to Web Services

19. Building Web Services with JAX-WS

20. Building RESTful Web Services with JAX-RS

21. JAX-RS: Advanced Topics and Example

Part IV Enterprise Beans

22. Enterprise Beans

23. Getting Started with Enterprise Beans

24. Running the Enterprise Bean Examples

25. A Message-Driven Bean Example

26. Using the Embedded Enterprise Bean Container

27. Using Asynchronous Method Invocation in Session Beans

Part V Contexts and Dependency Injection for the Java EE Platform

28. Introduction to Contexts and Dependency Injection for the Java EE Platform

29. Running the Basic Contexts and Dependency Injection Examples

30. Contexts and Dependency Injection for the Java EE Platform: Advanced Topics

31. Running the Advanced Contexts and Dependency Injection Examples

Part VI Persistence

32. Introduction to the Java Persistence API

33. Running the Persistence Examples

34. The Java Persistence Query Language

35. Using the Criteria API to Create Queries

36. Creating and Using String-Based Criteria Queries

37. Controlling Concurrent Access to Entity Data with Locking

38. Using a Second-Level Cache with Java Persistence API Applications

Part VII Security

39. Introduction to Security in the Java EE Platform

40. Getting Started Securing Web Applications

41. Getting Started Securing Enterprise Applications

42. Java EE Security: Advanced Topics

Part VIII Java EE Supporting Technologies

43. Introduction to Java EE Supporting Technologies

44. Transactions

45. Resources and Resource Adapters

46. The Resource Adapter Example

47. Java Message Service Concepts

48. Java Message Service Examples

49. Bean Validation: Advanced Topics

50. Using Java EE Interceptors

Part IX Case Studies

51. Duke's Bookstore Case Study Example

52. Duke's Tutoring Case Study Example

53. Duke's Forest Case Study Example

Index

B

basic authentication, HTTP Basic Authentication

EJB, Specifying an Authentication Mechanism and Secure Connection

example, The hello2_basicauth Example: Basic Authentication with a Servlet

bean-managed transactions, Managing Distributed Transactions

See transactions, bean-managed

beans, defined for CDI, About Beans

beans.xml file, Configuring a CDI Application

Bean Validation, Bean Validation

advanced, Bean Validation: Advanced Topics

constraints, Bean Validation Constraints in address-book

custom constraints, Creating Custom Constraints

examples, The address-book Application

groups, Grouping Constraints

Java Persistence API, Validating Persistent Fields and Properties

JavaServer Faces applications

Using Bean Validation

Validating Contact Input from a JavaServer Faces Application

localization, Localizing Validation Messages

messages, Customizing Validator Messages

ordering, Customizing Group Validation Order

resource bundles, The ValidationMessages Resource Bundle

beforeCompletion method, Synchronizing a Session Bean’s Instance Variables

BLOBs, See persistence, BLOBs

bookmarkable URLs

component tags, Creating Bookmarkable URLs with the h:button and h:link Tags

example, The bookmarks Example Application

view parameters, Using View Parameters to Configure Bookmarkable URLs

BufferedReader class, Getting Information from Requests

build artifacts, removing, Undeploying Web Modules

bundles, See resource bundles

business logic, Benefits of Enterprise Beans

business methods, Remote Clients

client calls, Business Methods

exceptions, Business Methods

locating, Creating the converter Web Client

requirements, Business Methods

transactions

Summary of Transaction Attributes

Synchronizing a Session Bean’s Instance Variables

Returning without Committing

Updating Multiple Databases

BytesMessage interface, Message Bodies

C

CallbackHandler interface, Securing Application Clients

capture-schema tool, GlassFish Server Tools

CDI

See Contexts and Dependency Injection (CDI) for the Java EE platform

certificate authorities, Working with Digital Certificates

certificates, Java SE Security Mechanisms

client, Creating a Client Certificate for Mutual Authentication

digital

Transport-Layer Security

Working with Digital Certificates

Working with Digital Certificates

server, Using a Different Server Certificate with the GlassFish Server

server, generating, Creating a Server Certificate

using for authentication, Adding Users to the Certificate Realm

character encodings, Character Encoding

character sets, Character Sets

class files, removing, Undeploying Web Modules

CLIENT_ACKNOWLEDGE mode, Controlling Message Acknowledgment

client certificates, generating, Creating a Client Certificate for Mutual Authentication

client ID, for durable subscriptions, Creating Durable Subscriptions

clients

authenticating

Client Authentication

Enabling Mutual Authentication over SSL

securing, Securing Application Clients

CLOBs, See persistence, CLOBs

collections

persistence

Using Collections in Entity Fields and Properties

Collection-Valued Query Results

commit method, Methods Not Allowed in Container-Managed Transactions

commit method (JMS), Using JMS API Local Transactions

commits, See transactions, commits

Common Client Interface, Connector architecture, Common Client Interface

component binding

Using the EL to Reference Managed Beans

Writing Bean Properties

Binding Component Values and Instances to Managed Bean Properties

Binding a Component Instance to a Bean Property

binding attribute

Using the EL to Reference Managed Beans

Binding Component Values and Instances to Managed Bean Properties

Binding a Component Instance to a Bean Property

component-managed sign-on

Securing Enterprise Information Systems Applications

Component-Managed Sign-On

component properties, See managed bean properties

component rendering model

User Interface Component Model

Component Rendering Model

decode method

Apply Request Values Phase

Performing Decoding

Handling Events for Custom Components

Creating a Custom Converter

decoding

When to Use a Custom Renderer

Creating Custom Component Classes

delegated implementation, When to Use a Custom Renderer

direct implementation, When to Use a Custom Renderer

encodeBegin method, Performing Encoding

encodeChildren method, Performing Encoding

encodeEnd method

Performing Encoding

Creating the Renderer Class

encode method, Creating a Custom Converter

encoding

When to Use a Custom Renderer

Creating Custom Component Classes

HTML render kit

Defining the Custom Component Tag in a Tag Library Descriptor

Registering a Custom Renderer with a Render Kit

Renderer class, Component Rendering Model

Renderer implementation, Registering a Custom Renderer with a Render Kit

render kit, Component Rendering Model

RenderKit class, Component Rendering Model

RenderKit implementation, Registering a Custom Renderer with a Render Kit

components

buttons

Adding Components to a Page Using HTML Tags

Rendering a Button with the h:commandButton Tag

check boxes

Adding Components to a Page Using HTML Tags

Adding Components to a Page Using HTML Tags

Displaying a Check Box Using the h:selectBooleanCheckbox Tag

Displaying Components for Selecting Multiple Values

combo boxes

Adding Components to a Page Using HTML Tags

Adding Components to a Page Using HTML Tags

data grids, Adding Components to a Page Using HTML Tags

hidden fields, Adding Components to a Page Using HTML Tags

hyperlinks

Adding Components to a Page Using HTML Tags

Rendering a Hyperlink with the h:commandLink Tag

images, Adding Graphics and Images with the h:graphicImage Tag

labels

Adding Components to a Page Using HTML Tags

Adding Components to a Page Using HTML Tags

list boxes

Adding Components to a Page Using HTML Tags

Adding Components to a Page Using HTML Tags

menus

Displaying a Menu Using the h:selectOneMenu Tag

Displaying Components for Selecting Multiple Values

password fields, Adding Components to a Page Using HTML Tags

radio buttons, Adding Components to a Page Using HTML Tags

table columns, Adding Components to a Page Using HTML Tags

tables

Adding Components to a Page Using HTML Tags

Laying Out Components with the h:panelGrid and h:panelGroup Tags

Using Data-Bound Table Components

text areas, Adding Components to a Page Using HTML Tags

text fields, Adding Components to a Page Using HTML Tags

component tag attributes

action attribute

Using Command Component Tags for Performing Actions and Navigation

Writing a Method to Handle Navigation

Understanding the Facelets Page

actionListener attribute

Using Command Component Tags for Performing Actions and Navigation

Referencing a Managed Bean Method

Writing a Method to Handle an Action Event

Understanding the Facelets Page

alt attribute, Understanding the Facelets Page

binding attribute

Common Component Tag Attributes

The value and binding Attributes

Using the EL to Reference Managed Beans

Binding Component Values and Instances to Managed Bean Properties

Binding a Component Instance to a Bean Property

columns attribute, Laying Out Components with the h:panelGrid and h:panelGroup Tags

converter attribute

Using Text Components

Converting a Component’s Value

Using a Custom Converter

for attribute

Rendering a Label with the h:outputLabel Tag

Displaying Error Messages with the h:message and h:messages Tags

id attribute

Common Component Tag Attributes

The id Attribute

immediate attribute

Common Component Tag Attributes

The immediate Attribute

Understanding the Facelets Page

redisplay attribute, Rendering a Password Field with the h:inputSecret Tag

rendered attribute

Common Component Tag Attributes

The rendered Attribute

Binding a Component Instance to a Bean Property

style attribute

Common Component Tag Attributes

The style and styleClass Attributes

Displaying Error Messages with the h:message and h:messages Tags

styleClass attribute

Common Component Tag Attributes

The style and styleClass Attributes

validator attribute

Using Text Components

Writing a Method to Perform Validation

value attribute

Common Component Tag Attributes

The value and binding Attributes

Writing Bean Properties

Configuring Model Data

Binding Component Values and Instances to Managed Bean Properties

Binding a Component Value to a Property

valueChangeListener attribute

Using Text Components

Referencing a Method That Handles a Value-Change Event

Writing a Method to Handle a Value-Change Event

var attribute, Retrieving Localized Messages

component tags

Writing Bean Properties

Component Rendering Model

Event and Listener Model

attributes

See component tag attributes

body tag, Adding HTML Head and Body Tags

bookmarkable URLs, Creating Bookmarkable URLs with the h:button and h:link Tags

button tag, Creating Bookmarkable URLs with the h:button and h:link Tags

column tag, Adding Components to a Page Using HTML Tags

commandButton tag

Adding Components to a Page Using HTML Tags

Rendering a Button with the h:commandButton Tag

commandLink tag

Adding Components to a Page Using HTML Tags

Rendering a Hyperlink with the h:commandLink Tag

dataTable tag

Adding Components to a Page Using HTML Tags

Using Data-Bound Table Components

UIData Properties

form tag

Adding Components to a Page Using HTML Tags

Adding a Form Component

Adding a Form Component

graphicImage tag

Adding Components to a Page Using HTML Tags

Adding Graphics and Images with the h:graphicImage Tag

head tag, Adding HTML Head and Body Tags

h:graphicImage tag, Understanding the Facelets Page

inputHidden tag

Adding Components to a Page Using HTML Tags

Using Text Components

inputSecret tag

Adding Components to a Page Using HTML Tags

Using Text Components

Rendering a Password Field with the h:inputSecret Tag

inputTextarea tag

Adding Components to a Page Using HTML Tags

Using Text Components

inputText tag

Adding Components to a Page Using HTML Tags

Using Text Components

Rendering a Text Field with the h:inputText Tag

link tag, Creating Bookmarkable URLs with the h:button and h:link Tags

messages tag

Adding Components to a Page Using HTML Tags

Displaying Error Messages with the h:message and h:messages Tags

message tag

Adding Components to a Page Using HTML Tags

Displaying Error Messages with the h:message and h:messages Tags

outputFormat tag

Adding Components to a Page Using HTML Tags

Using Text Components

Displaying a Formatted Message with the h:outputFormat Tag

outputLabel tag

Adding Components to a Page Using HTML Tags

Using Text Components

Rendering a Label with the h:outputLabel Tag

outputLink tag

Adding Components to a Page Using HTML Tags

Using Text Components

Rendering a Hyperlink with the h:outputLink Tag

outputScript tag, Resource Relocation Using h:outputScript and h:outputStylesheet Tags

outputStylesheet tag, Resource Relocation Using h:outputScript and h:outputStylesheet Tags

outputText tag

Adding Components to a Page Using HTML Tags

Using Text Components

Rendering a Text Field with the h:inputText Tag

Rendering a Hyperlink with the h:commandLink Tag

UIData Properties

panelGrid tag

Adding Components to a Page Using HTML Tags

Laying Out Components with the h:panelGrid and h:panelGroup Tags

panelGroup tag

Adding Components to a Page Using HTML Tags

Laying Out Components with the h:panelGrid and h:panelGroup Tags

resource relocation, Resource Relocation Using h:outputScript and h:outputStylesheet Tags

selectBooleanCheckbox tag

Adding Components to a Page Using HTML Tags

Displaying a Check Box Using the h:selectBooleanCheckbox Tag

UISelectBoolean Properties

selectItems tag, UISelectItems Properties

selectManyCheckbox tag

Adding Components to a Page Using HTML Tags

Displaying Components for Selecting Multiple Values

UISelectMany Properties

selectManyListbox tag

Adding Components to a Page Using HTML Tags

Displaying Components for Selecting Multiple Values

selectManyMenu tag

Adding Components to a Page Using HTML Tags

Displaying Components for Selecting Multiple Values

selectOneListbox tag

Adding Components to a Page Using HTML Tags

Displaying a Menu Using the h:selectOneMenu Tag

selectOneMenu tag

Adding Components to a Page Using HTML Tags

Displaying a Menu Using the h:selectOneMenu Tag

UISelectOne Properties

UISelectItem Properties

selectOneRadio tag

Adding Components to a Page Using HTML Tags

Displaying a Menu Using the h:selectOneMenu Tag

composite components

advanced features, Composite Components: Advanced Topics and Example

attributes, Attributes of a Composite Component

default attribute, Attributes of a Composite Component

example, The compositecomponentlogin Example Application

Facelets, Composite Components

f:validateBean tag, Validating Composite Component Values

f:validateRegex tag, Validating Composite Component Values

f:validateRequired tag, Validating Composite Component Values

invoking managed beans, Invoking a Managed Bean

method-signature attribute, Attributes of a Composite Component

name attribute, Attributes of a Composite Component

required attribute, Attributes of a Composite Component

type attribute, Attributes of a Composite Component

validating values, Validating Composite Component Values

concurrent access, Transactions

concurrent access to entity data, Overview of Entity Locking and Concurrency

conditional HTTP requests, JAX-RS, Conditional HTTP Requests

confidentiality, Establishing a Secure Connection Using SSL

configuring JavaServer Faces applications

Application class, Application Configuration Resource File

application configuration resource files, Application Configuration Resource File

configuring managed beans

Using Annotations to Configure Managed Beans

Configuring Managed Beans

configuring navigation rules

See configuring navigation rules

error message registration, Creating and Using a Custom Validator

faces-config.xml files, Configuring Navigation Rules

including the classes, pages, and other resources, Including the Classes, Pages, and Other Resources

javax.faces.application.CONFIG_FILES context parameter, Application Configuration Resource File

registering custom converters, Registering a Custom Converter

registering custom renderers, Registering a Custom Renderer with a Render Kit

registering custom UI components, Registering a Custom Component

registering custom validators, Registering a Custom Validator

registering messages, Registering Application Messages

specifying where UI component state is saved, Saving and Restoring State

value binding, Binding a Component Value to a Property

configuring managed beans

Configuring Model Data

Configuring Managed Beans

configuring navigation rules

Navigation Model

Configuring Navigation Rules

from-action element, Configuring Navigation Rules

from-view-id element, Configuring Navigation Rules

navigation-case element

Configuring Navigation Rules

Configuring Navigation Rules

navigation-rule element

Configuring Navigation Rules

Configuring Navigation Rules

to-view-id element, Configuring Navigation Rules

connection factories, JMS Connection Factories

creating

Administered Objects for the simplemessage Example

To Create JMS Resources Using NetBeans IDE

injecting resources

The simplemessage Application Client

JMS Connection Factories

specifying for remote servers, To Create Administered Objects for Multiple Systems

ConnectionFactory interface (JMS), JMS Connection Factories

Connection interface

Methods Not Allowed in Container-Managed Transactions

Transactions in Web Components

Connection interface (JMS), JMS Connections

connection pooling, DataSource Objects and Connection Pools

connections, securing, Establishing a Secure Connection Using SSL

connections, JMS

introduction, JMS Connections

managing in enterprise bean applications, Managing JMS Resources in Session Beans

connectors, See Java EE Connector architecture

container-managed sign-on

Securing Enterprise Information Systems Applications

Container-Managed Sign-On

container-managed transactions, See transactions, container-managed

containers, Java EE Containers

application client, Container Types

configurable services, Container Services

See also EJB container, web container

nonconfigurable services, Container Services

securing, Securing Containers

security, Overview of Java EE Security

services, Container Services

trust between, Trust between Containers

web, Web Applications

context parameters, To View the hello1 Web Module Using NetBeans IDE

specifying, To Add a Context Parameter Using NetBeans IDE

context roots, To Set the Context Root

Contexts and Dependency Injection (CDI) for the Java EE platform, Contexts and Dependency Injection for the Java EE Platform (JSR 299)

advanced topics, Contexts and Dependency Injection for the Java EE Platform: Advanced Topics

alternatives, Using Alternatives in CDI Applications

basic concepts, Introduction to Contexts and Dependency Injection for the Java EE Platform

beans, About Beans

configuring applications, Configuring a CDI Application

converting managed beans to JAX-RS root resource classes, Integrating JAX-RS with EJB Technology and CDI

decorators, Using Decorators in CDI Applications

disposer methods, Using a Disposer Method

EL, Giving Beans EL Names

events, Using Events in CDI Applications

examples

Running the Basic Contexts and Dependency Injection Examples

Running the Advanced Contexts and Dependency Injection Examples

Facelets pages, Using a Managed Bean in a Facelets Page

injectable objects, Beans as Injectable Objects

injecting beans, Injecting Beans

integrating with JAX-RS, Integrating JAX-RS with EJB Technology and CDI

interceptors, Using Interceptors in CDI Applications

managed beans, About CDI Managed Beans

observer methods, Using Observer Methods to Handle Events

overview, Overview of CDI

producer fields

Using Producer Methods, Producer Fields, and Disposer Methods in CDI Applications

Using Producer Fields to Generate Resources

producer methods

Injecting Objects by Using Producer Methods

Using Producer Methods, Producer Fields, and Disposer Methods in CDI Applications

Using Producer Methods

qualifiers, Using Qualifiers

scopes, Using Scopes

setter and getter methods, Adding Setter and Getter Methods

specialization, Using Specialization

stereotypes, Using Stereotypes in CDI Applications

conversational state, Stateful Session Beans

conversion model

User Interface Component Model

Conversion Model

converter attribute

Using Text Components

Converting a Component’s Value

Using a Custom Converter

converterId attribute, Converting a Component’s Value

Converter implementations

Using the Standard Converters

Conversion Model

Using a Custom Converter

Converter interface, Creating a Custom Converter

See also converters

See also converter tags

converting data between model and presentation, Conversion Model

javax.faces.convert package, Using the Standard Converters

model view

Creating a Custom Converter

Creating a Custom Converter

presentation view

Creating a Custom Converter

Creating a Custom Converter

Converter implementation classes

BigDecimalConverter class, Using the Standard Converters

BigIntegerConverter class, Using the Standard Converters

BooleanConverter class, Using the Standard Converters

ByteConverter class, Using the Standard Converters

CharacterConverter class, Using the Standard Converters

DateTimeConverter class

Using the Standard Converters

Using the Standard Converters

Using DateTimeConverter

DoubleConverter class, Using the Standard Converters

EnumConverter class, Using the Standard Converters

FloatConverter class, Using the Standard Converters

IntegerConverter class, Using the Standard Converters

LongConverter class, Using the Standard Converters

NumberConverter class

Using the Standard Converters

Converting a Component’s Value

Using NumberConverter

ShortConverter class, Using the Standard Converters

converters

Restore View Phase

User Interface Component Model

custom converters

Conversion Model

Using a Custom Converter

See also standard converters

converter tags

convertDateTime tag, Using DateTimeConverter

convertDateTime tag attributes, Using DateTimeConverter

converter tag, Converting a Component’s Value

convertNumber tag

Converting a Component’s Value

Using NumberConverter

convertNumber tag attributes, Using NumberConverter

f:converter tag, Using a Custom Converter

converting data, See conversion model

cookie parameters, JAX-RS, Extracting Request Parameters

createBrowser method, Writing the Client for the QueueBrowser Example

createTimer method, Creating Programmatic Timers

credential, Some Other Terminology

Criteria API, Using the Criteria API to Create Queries

creating queries, Creating a Criteria Query

examples, Criteria Queries in the roster Application

expressions

The Expression Interface Methods

Expression Methods in the CriteriaBuilder Interface

path navigation, Path Navigation in Criteria Queries

query execution, Executing Queries

query results

Restricting Criteria Query Results

Managing Criteria Query Results

criteria queries, string-based, Creating and Using String-Based Criteria Queries

cryptography, public-key, Working with Digital Certificates

custom converters

binding to managed bean properties, Binding Converters, Listeners, and Validators to Managed Bean Properties

creating, Creating and Using a Custom Converter

getAsObject(FacesContext, UIComponent, String) method, Creating a Custom Converter

getAsObject method, Creating a Custom Converter

getAsString(FacesContext, UIComponent, Object) method, Creating a Custom Converter

getAsString method, Creating a Custom Converter

registering, Registering a Custom Converter

using, Using a Custom Converter

custom objects

custom converters, Using a Custom Converter

See also custom renderers, custom tags, custom UI components, custom validators

using, Using a Custom Component

using custom components, renderers and tags together, Component, Renderer, and Tag Combinations

custom renderers

creating the Renderer class, Creating the Renderer Class

determining necessity of, When to Use a Custom Renderer

performing decoding, Performing Decoding

performing encoding, Performing Encoding

registering with a render kit, Registering a Custom Renderer with a Render Kit

custom tags

Validation Model

Component, Renderer, and Tag Combinations

getRendererType method, Identifying the Renderer Type

identifying the renderer type, Delegating Rendering to a Renderer

specifying, Specifying a Custom Tag

tag library descriptor

Steps for Creating a Custom Component

Specifying a Custom Tag

custom UI components

creating, Creating Custom UI Components and Other Custom Objects

creating component classes, Creating Custom Component Classes

custom objects, Using a Custom Component

delegating rendering, Delegating Rendering to a Renderer

determining necessity of, When to Use a Custom Component

handling events emitted by, Handling Events for Custom Components

queueEvent method, Performing Decoding

registering

See registering custom UI components

restoreState(FacesContext, Object) method, Saving and Restoring State

saveState(FacesContext) method, Saving and Restoring State

saving state, Saving and Restoring State

steps for creating, Steps for Creating a Custom Component

custom validators, Creating and Using a Custom Validator

binding to managed bean properties, Binding Converters, Listeners, and Validators to Managed Bean Properties

custom validator tags, Specifying a Custom Tag

f:validator tag

Creating and Using a Custom Validator

Specifying a Custom Tag

implementing the Validator interface, Implementing the Validator Interface

registering, Registering a Custom Validator

using, Using a Custom Validator

validate method

Writing a Method to Perform Validation

Implementing the Validator Interface

Validator implementation

Writing Managed Bean Methods

Implementing the Validator Interface

Specifying a Custom Tag

Validator interface, Creating and Using a Custom Validator

Previous Contents Next

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices