HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
The Java EE 5 Tutorial is an introduction to programming server-side Java applications. This book takes a task-oriented, example-driven approach to show you how to build applications for the Java EE 5 platform. This book also describes the features and functionalities available with NetBeans 5.5.
What's new in this edition? The author team have updated the existing chapters to reflect the changes to JSP, EJB, Servlets, and more. Also, the authors have added new chapters on the Sun Java System Application Server 9 as a deployment environment for server-side technologies. The web-tier technology chapters cover the components used in developing the presentation layer of a Java EE 5 or stand-alone web application. The web services technology chapters cover the APIs used in developing standard web services. The Enterprise JavaBeans (EJB) technology chapters cover the components used in developing the business logic of a Java EE 5 application. The Persistence technology chapters cover the Java Persistence API, which is used for accessing databases from Java EE applications. The platform services chapters cover the system services used by all the Java EE 5 component technologies
An Overview of JavaServer Faces Technology
Who Should Use This Tutorial xxxi
Prerequisites; xxxi
How to Read This Tutorial xxxi
About the Examples xxxiv
Further Information xxxviii
Typographical Conventions xxxix
Acknowledgments xxxix
Feedback xli
Java EE Application Model 2
Distributed Multitiered Applications 3
Java EE Containers 8
Web Services Support 11
Java EE Application Assembly and Deployment 13
Packaging Applications 13
Development Roles 15
Java EE 5 APIs 18
Sun Java System Application Server Platform Edition 9 26
Web Application Life Cycle 36
Web Modules 38
Configuring Web Applications 46
Duke's Bookstore Examples 55
Accessing Databases from Web Applications 55
Further Information 57
What Is a Servlet? 59
The Example Servlets 60
Servlet Life Cycle 63
Sharing Information 66
Initializing a Servlet 70
Writing Service Methods 71
Filtering Requests and Responses 77
Invoking Other Web Resources 84
Accessing the Web Context 88
Maintaining Client State 89
Finalizing a Servlet 92
Further Information 95
What Is a JSP Page? 97
The Example JSP Pages 101
The Life Cycle of a JSP Page 107
Creating Static Content 110
Creating Dynamic Content 111
Unified Expression Language 113
JavaBeans Components 136
Using Custom Tags 141
Reusing Content in JSP Pages 145
Transferring Control to Another Web Component 146
Including an Applet 147
Setting Properties for Groups of JSP Pages 149
Further Information 154
The Example JSP Document 156
Creating a JSP Document 158
Identifying the JSP Document to the Container 173
The Example JSP Pages 176
Using JSTL 177
Core Tag Library 180
XML Tag Library 188
Internationalization Tag Library 192
SQL Tag Library 195
Functions 199
Further Information 201
What Is a Custom Tag? 204
The Example JSP Pages 204
Types of Tags 207
Encapsulating Reusable Content Using Tag Files 212
Tag Library Descriptors 229
Programming Simple Tag Handlers 240
The Example JSP Pages 262
Using Scripting 263
Disabling Scripting 264
Declarations 264
Scriptlets 265
Expressions 266
Programming Tags That Accept Scripting Elements 267
JavaServer Faces Technology Benefits 276
What Is a JavaServer Faces Application? 277
A Simple JavaServer Faces Application 278
User Interface Component Model 291
Navigation Model 302
Backing Beans 304
The Life Cycle of a JavaServer Faces Page 309
Further Information 315
The Example JavaServer Faces Application 318
Setting Up a Page 321
Using the Core Tags 324
Adding UI Components to a Page Using the HTML Component Tags 326
Using Localized Data 355
Using the Standard Converters 359
Registering Listeners on Components 366
Using the Standard Validators 369
Binding Component Values and Instances to External Data Sources 371
Binding Converters, Listeners, and Validators to Backing Bean Properties 378
Referencing a Backing Bean Method 379
Using Custom Objects 383
Technology 389
Writing Bean Properties 390
Performing Localization 402
Creating a Custom Converter 405
Implementing an Event Listener 408
Creating a Custom Validator 411
Writing Backing Bean Methods 418
Chapter 12: Creating Custom UI Components 425
Determining Whether You Need a Custom Component or Renderer 426
Understanding the Image Map Example 429
Steps for Creating a Custom Component 436
Creating Custom Component Classes 437
Delegating Rendering to a Renderer 446
Handling Events for Custom Components 449
Creating the Component Tag Handler 450
Defining the Custom Component Tag in a Tag Library Descriptor 455
Application Configuration Resource File 458
Configuring Beans 459
Registering Custom Error Messages 470
Registering Custom Localized Static Text 471
Registering a Custom Validator 472
Registering a Custom Converter 473
Configuring Navigation Rules 474
Registering a Custom Renderer with a Render Kit 478
Registering a Custom Component 480
Basic Requirements of a JavaServer Faces Application 481
Java Platform Localization Classes 493
Providing Localized Messages and Labels 494
Date and Number Formatting 498
Character Sets and Encodings 499
Further Information 503
Setting the Port 508
Creating a Simple Web Service and Client with JAX-WS 508
Types Supported by JAX-WS 516
Web Services Interoperability and JAX-WS 516
Further Information 517
JAXB Architecture 520
Representing XML Content 522
Binding XML Schemas 523
Customizing JAXB Bindings 526
Examples 533
Basic Examples 545
Customizing JAXB Bindings 549
Java-to-Schema Examples 575
Further Information 589
Why StAX? 591
StAX API 595
Using StAX 602
Sun's Streaming XML Parser Implementation 611
Example Code 612
Further Information 631
Overview of SAAJ 634
Tutorial 639
Code Examples 667
Further Information 692
What Is an Enterprise Bean? 743
What Is a Session Bean? 745
What Is a Message-Driven Bean? 747
Defining Client Access with Interfaces 749
The Contents of an Enterprise Bean 754
Naming Conventions for Enterprise Beans 755
The Life Cycles of Enterprise Beans 755
Further Information 758
Creating the Enterprise Bean 760
Creating the Application Client 763
Creating the Web Client 765
Deploying the Java EE Application 767
Running the Application Client 768
Running the Web Client 769
Modifying the Java EE Application 770
The cart Example 771
A Web Service Example: helloservice 780
Using the Timer Service 783
Handling Exceptions 789
Example Application Overview 791
The Application Client 792
The Message-Driven Bean Class 793
Packaging, Deploying, and Running the SimpleMessage Example 795
Creating Deployment Descriptors for Message-Driven Beans 798
Entities 803
Managing Entities 816
Accessing Databases from Web Applications 825
The order Application 835
The roster Application 853
Terminology 862
Simplified Syntax 862
Example Queries 863
Full Syntax 870
Overview 900
Security Implementation Mechanisms 906
Securing Containers 910
Securing the Application Server 913
Working with Realms, Users, Groups, and Roles 914
Establishing a Secure Connection Using SSL 922
Further Information 934
Securing Enterprise Beans 938
Enterprise Bean Example Applications 963
Securing Application Clients 978
Securing EIS Applications 980
Example Applications in the Application Server 984
Further Information 984
Overview 988
Working with Security Roles 989
Checking Caller Identity Programmatically 994
Defining Security Requirements for Web Applications 998
Examples: Securing Web Applications 1018
Further Information 1049
Overview 1051
Basic JMS API Concepts 1055
The JMS API Programming Model 1059
Writing Simple JMS Client Applications 1071
Creating Robust JMS Applications 1098
Using the JMS API in a Java EE Application 1119
Further Information 1127
A Java EE Application That Uses the JMS API with a Session Bean 1130
A Java EE Application That Uses the JMS API with an Entity 1136
An Application Example That Consumes Messages from a Remote Server 1146
An Application Example That Deploys a Message-Driven Bean on Two Servers 1153
What Is a Transaction? 1165
Container-Managed Transactions 1166
Bean-Managed Transactions 1173
Transaction Timeouts 1174
Updating Multiple Databases 1175
Transactions in Web Components 1177
Resources and JNDI Naming 1179
DataSource Objects and Connection Pools 1181
Resource Injection 1182
The confirmer Example Application 1186
Further Information 1190
About Resource Adapters 1191
Resource Adapter Contracts 1193
Common Client Interface 1196
Further Information 1197
Common Code 1202
JAX-WS Coffee Supplier Service 1202
SAAJ Coffee Supplier Service 1204
Coffee Break Server 1219
Building, Packaging, Deploying, and Running the Application 1226
Enterprise Beans 1234
Application Client 1240
Web Client 1243
Building, Packaging, Deploying, and Running the Application 1253
Further Information 1260
Download the Index from this book.