did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321245755

The J2EE(TM) Tutorial

by ; ; ; ; ; ; ;
  • ISBN13:

    9780321245755

  • ISBN10:

    032124575X

  • Edition: 2nd
  • Format: Paperback w/CD
  • Copyright: 2004-01-01
  • Publisher: Prentice Hall PTR
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $59.99

Summary

Discover the ins-and-outs of the new J2EE 1.4 platform and learn how to build J2EE applications with the latest edition of this tutorial.

Author Biography

Stephanie Bodoff, Eric Armstrong, Jennifer Ball, Debbie Bode Carson, Ian Evans, Dale Green, Kim Haase, and Eric Jendrock are Sun Microsystems staff writers.

Table of Contents

Forewordp. xxxv
About This Tutorialp. xxxvii
Overviewp. 1
Distributed Multitiered Applicationsp. 2
J2EE Containersp. 8
Web Services Supportp. 10
Packaging Applicationsp. 12
Development Rolesp. 14
J2EE 1.4 Platform APIsp. 16
Sun Java System Application Server Platform Edition 8p. 23
Understanding XMLp. 31
Introduction to XMLp. 31
Generating XML Datap. 41
Designing an XML Data Structurep. 74
Summaryp. 79
Getting Started with Web Applicationsp. 81
Web Application Life Cyclep. 84
Web Modulesp. 86
Configuring Web Applicationsp. 95
Duke's Bookstore Examplesp. 100
Accessing Databases from Web Applicationsp. 100
Further Informationp. 104
Java API for XML Processingp. 105
The JAXP APIsp. 105
An Overview of the Packagesp. 106
The Simple API for XML APIsp. 107
The Document Object Model APIsp. 110
The Extensible Stylesheet Language Transformations APIsp. 111
Using the JAXP Librariesp. 113
Where Do You Go from Here?p. 113
Simple API for XMLp. 115
When to Use SAXp. 116
Echoing an XML File with the SAX Parserp. 117
Adding Additional Event Handlersp. 135
Handling Errors with the Nonvalidating Parserp. 139
Displaying Special Characters and CDATAp. 147
Parsing with a DTDp. 149
Choosing Your Parser Implementationp. 155
Using the Validating Parserp. 155
Parsing a Parameterized DTDp. 162
Handling Lexical Eventsp. 164
Using the DTDHandler and EntityResolverp. 171
Further Informationp. 173
Document Object Modelp. 175
When to Use DOMp. 176
Reading XML Data into a DOMp. 182
Displaying a DOM Hierarchyp. 189
Examining the Structure of a DOMp. 205
Constructing a User-Friendly JTree from a DOMp. 213
Creating and Manipulating a DOMp. 228
Validating with XML Schemap. 237
Further Informationp. 243
Extensible Stylesheet Language Transformationsp. 245
Introducing XSL, XSLT and XPathp. 246
How XPath Worksp. 247
Writing Out a DOM as an XML Filep. 257
Generating XML from an Arbitrary Data Structurep. 264
Transforming XML Data with XSLTp. 278
Transforming from the Command Line with Xalanp. 303
Concatenating Transformations with a Filter Chainp. 303
Further Informationp. 311
Building Web Services with JAX-RPCp. 313
Setting the Portp. 314
Creating a Simple Web Service and Client with JAX-RPCp. 314
Types Supported by JAX-RPCp. 324
Web Service Clientsp. 326
Web Services Interoperability and JAX-RPCp. 337
Further Informationp. 337
SOAP with Attachments API for Javap. 339
Overview of SAAJp. 340
Tutorialp. 345
Code Examplesp. 371
Further Informationp. 388
Java API for XML Registriesp. 389
Overview of JAXRp. 389
Implementing a JAXR Clientp. 393
Running the Client Examplesp. 417
Using JAXR Clients in J2EE Applicationsp. 425
Further Informationp. 434
Java Servlet Technologyp. 435
What Is a Servlet?p. 435
The Example Servletsp. 436
Servlet Life Cyclep. 441
Sharing Informationp. 444
Initializing a Servletp. 447
Writing Service Methodsp. 448
Filtering Requests and Responsesp. 454
Invoking Other Web Resourcesp. 460
Accessing the Web Contextp. 463
Maintaining Client Statep. 464
Finalizing a Servletp. 467
Further Informationp. 470
JavaServer Pages Technologyp. 471
What Is a JSP Page?p. 471
The Example JSP Pagesp. 476
The Life Cycle of a JSP Pagep. 482
Creating Static Contentp. 486
Creating Dynamic Contentp. 487
Expression Languagep. 489
JavaBeans Componentsp. 497
Using Custom Tagsp. 502
Reusing Content in JSP Pagesp. 506
Transferring Control to Another Web Componentp. 507
Including an Appletp. 508
Setting Properties for Groups of JSP Pagesp. 510
Further Informationp. 513
JavaServer Pages Documentsp. 515
The Example JSP Documentp. 516
Creating a JSP Documentp. 521
Identifying the JSP Document to the Containerp. 535
JavaServer Pages Standard Tag Libraryp. 537
The Example JSP Pagesp. 538
Using JSTLp. 541
Core Tag Libraryp. 543
XML Tag Libraryp. 550
Internationalization Tag Libraryp. 554
SQL Tag Libraryp. 556
Functionsp. 561
Further Informationp. 562
Custom Tags in JSP Pagesp. 563
What Is a Custom Tag?p. 564
The Example JSP Pagesp. 564
Types of Tagsp. 568
Encapsulating Reusable Content Using Tag Filesp. 573
Tag Library Descriptorsp. 589
Programming Simple Tag Handlersp. 598
Scripting in JSP Pagesp. 617
The Example JSP Pagesp. 618
Using Scriptingp. 619
Disabling Scriptingp. 620
Declarationsp. 620
Scriptletsp. 621
Expressionsp. 622
Programming Tags That Accept Scripting Elementsp. 623
JavaServer Faces Technologyp. 631
JavaServer Faces Technology Benefitsp. 633
What Is a JavaServer Faces Application?p. 633
Framework Rolesp. 634
A Simple JavaServer Faces Applicationp. 635
User Interface Component Modelp. 644
Navigation Modelp. 654
Backing Bean Managementp. 656
How the Pieces Fit Togetherp. 659
The Life Cycle of a JavaServer Faces Pagep. 662
Further Informationp. 669
Using JavaServer Faces Technology in JSP Pagesp. 671
The Example JavaServer Faces Applicationp. 672
Setting Up a Pagep. 676
Using the Core Tagsp. 678
Using the HTML Component Tagsp. 680
Using Localized Messagesp. 703
Using the Standard Convertersp. 705
Registering Listeners on Componentsp. 710
Using the Standard Validatorsp. 712
Binding Component Values and Instances to External Data Sourcesp. 714
Referencing a Backing Bean Methodp. 719
Using Custom Objectsp. 723
Developing with JavaServer Faces Technologyp. 729
Writing Component Propertiesp. 730
Performing Localizationp. 741
Creating a Custom Converterp. 744
Implementing an Event Listenerp. 747
Creating a Custom Validatorp. 750
Writing Backing Bean Methodsp. 755
Creating Custom UI Componentsp. 761
Determining Whether You Need a Custom Component or Rendererp. 762
Understanding the Image Map Examplep. 765
Steps for Creating a Custom Componentp. 771
Creating the Component Tag Handlerp. 772
Defining the Custom Component Tag in a Tag Library Descriptorp. 777
Creating Custom Component Classesp. 778
Delegating Rendering to a Rendererp. 786
Handling Events for Custom Componentsp. 788
Configuring JavaServer Faces Applicationsp. 791
Application Configuration Resource Filep. 792
Configuring Beansp. 793
Registering Messagesp. 802
Registering a Custom Validatorp. 803
Registering a Custom Converterp. 804
Configuring Navigation Rulesp. 805
Registering a Custom Renderer with a Render Kitp. 808
Registering a Custom Componentp. 810
Basic Requirements of a JavaServer Faces Applicationp. 811
Internationalizing and Localizing Web Applicationsp. 819
Java Platform Localization Classesp. 819
Providing Localized Messages and Labelsp. 820
Date and Number Formattingp. 823
Character Sets and Encodingsp. 823
Further Informationp. 827
Enterprise Beansp. 829
What Is an Enterprise Bean?p. 829
What Is a Session Bean?p. 831
What Is an Entity Bean?p. 833
What Is a Message-Driven Bean?p. 838
Defining Client Access with Interfacesp. 840
The Contents of an Enterprise Beanp. 845
Naming Conventions for Enterprise Beansp. 846
The Life Cycles of Enterprise Beansp. 847
Further Informationp. 851
Getting Started with Enterprise Beansp. 853
Creating the J2EE Applicationp. 854
Creating the Enterprise Beanp. 854
Creating the Application Clientp. 858
Creating the Web Clientp. 863
Mapping the Enterprise Bean Referencesp. 866
Specifying the Web Client's Context Rootp. 868
Deploying the J2EE Applicationp. 868
Running the Application Clientp. 869
Running the Web Clientp. 869
Modifying the J2EE Applicationp. 870
Session Bean Examplesp. 873
The CartBean Examplep. 873
A Web Service Example: HelloServiceBeanp. 884
Other Enterprise Bean Featuresp. 889
Using the Timer Servicep. 892
Handling Exceptionsp. 901
Bean-Managed Persistence Examplesp. 903
The SavingsAccountBean Examplep. 903
Mapping Table Relationships for Bean-Managed Persistencep. 919
Primary Keys for Bean-Managed Persistencep. 933
deploytool Tips for Entity Beans with Bean-Managed Persistencep. 937
Container-Managed Persistence Examplesp. 939
Overview of the RosterApp Applicationp. 939
The PlayerBean Codep. 941
Method Invocations in RosterAppp. 947
Building and Running the RosterApp Examplep. 958
A Guided Tour of the RosterApp Settingsp. 972
Primary Keys for Container-Managed Persistencep. 980
Advanced CMP Topics: The OrderApp Examplep. 984
deploytool Tips for Entity Beans with Container-Managed Persistencep. 1000
A Message-Driven Bean Examplep. 1003
Example Application Overviewp. 1003
The Application Clientp. 1004
The Message-Driven Bean Classp. 1005
Deploying and Running SimpleMessageAppp. 1007
deploytool Tips for Message-Driven Beansp. 1010
deploytool Tips for Components That Send Messagesp. 1011
Enterprise JavaBeans Query Languagep. 1015
Terminologyp. 1016
Simplified Syntaxp. 1016
Example Queriesp. 1017
Full Syntaxp. 1022
EJB QL Restrictionsp. 1044
Transactionsp. 1045
What Is a Transaction?p. 1045
Container-Managed Transactionsp. 1046
Bean-Managed Transactionsp. 1057
Summary of Transaction Options for Enterprise Beansp. 1069
Transaction Timeoutsp. 1070
Isolation Levelsp. 1070
Updating Multiple Databasesp. 1071
Transactions in Web Componentsp. 1073
Resource Connectionsp. 1075
JNDI Namingp. 1075
DataSource Objects and Connection Poolsp. 1077
Database Connectionsp. 1078
Mail Session Connectionsp. 1080
URL Connectionsp. 1083
Further Informationp. 1086
Securityp. 1087
Overviewp. 1087
Realms, Users, Groups, and Rolesp. 1088
Web-Tier Securityp. 1092
Understanding Login Authenticationp. 1100
Installing and Configuring SSL Supportp. 1114
XML and Web Services Securityp. 1125
EJB-Tier Securityp. 1142
Application Client-Tier Securityp. 1145
EIS-Tier Securityp. 1147
Propagating Security Identityp. 1149
What Is Java Authorization Contract for Containers?p. 1151
Further Informationp. 1152
The Java Message Service APIp. 1153
Overviewp. 1154
Basic JMS API Conceptsp. 1157
The JMS API Programming Modelp. 1162
Writing Simple JMS Client Applicationsp. 1173
Creating Robust JMS Applicationsp. 1191
Using the JMS API in a J2EE Applicationp. 1212
Further Informationp. 1220
J2EE Examples Using the JMS APIp. 1221
A J2EE Application That Uses the JMS API with a Session Beanp. 1222
A J2EE Application That Uses the JMS API with an Entity Beanp. 1231
An Application Example That Consumes Messages from a Remote J2EE Serverp. 1239
An Application Example That Deploys a Message-Driven Bean on Two J2EE Serversp. 1246
The Coffee Break Applicationp. 1255
Common Codep. 1256
JAX-RPC Coffee Supplier Servicep. 1257
SAAJ Coffee Supplier Servicep. 1265
Coffee Break Serverp. 1280
JavaServer Faces Version of Coffee Break Serverp. 1284
Building, Packaging, Deploying, and Running the Applicationp. 1290
The Duke's Bank Applicationp. 1301
Enterprise Beansp. 1302
Application Clientp. 1310
Web Clientp. 1318
Internationalizationp. 1327
Building, Packaging, Deploying, and Running the Applicationp. 1328
Running the Clientsp. 1338
Java Encoding Schemesp. 1341
Further Informationp. 1342
XML and Related Specs: Digesting the Alphabet Soupp. 1343
Basic Standardsp. 1344
Schema Standardsp. 1348
Linking and Presentation Standardsp. 1350
Knowledge Standardsp. 1351
Standards That Build on XMLp. 1352
Summaryp. 1354
HTTP Overviewp. 1355
HTTP Requestsp. 1356
HTTP Responsesp. 1356
J2EE Connector Architecturep. 1357
About Resource Adaptersp. 1357
Resource Adapter Contractsp. 1359
Common Client Interfacep. 1362
Further Informationp. 1363
Glossaryp. 1365
About the Authorsp. 1403
Indexp. 1405
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

About This Tutorial The J2EEtrade; Tutorial, Second Editionis a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial. Who Should Use This Tutorial This tutorial is intended for programmers who are interested in developing and deploying J2EE 1.4 applications on the Sun Java System Application Server Platform Edition 8. Prerequisites Before proceeding with this tutorial you should have a good knowledge of the Java programming language. A good way to get to that point is to work through all the basic and some of the specialized trails inThe Javatrade; Tutorial, Mary Campione et al. (Addison-Wesley, 2000). In particular, you should be familiar with relational database and security features. How to Read This Tutorial The J2EE 1.4 platform is quite large, and this tutorial reflects this. However, you don't have to digest everything in it at once. This tutorial opens with three introductory chapters, which you should read before proceeding to any specific technology area. Chapter 1 covers the J2EE 1.4 platform architecture and APIs along with the Sun Java System Application Server Platform Edition 8. Chapters 2 and 3 cover XML basics and getting started with Web applications. When you have digested the basics, you can delve into one or more of the four main technology areas listed next. The Java XML chapters cover the technologies for developing applications that process XML documents and implement Web services components: The Java API for XML Processing (JAXP) The Java API for XML-based RPC (JAX-RPC) SOAP with Attachments API for Java (SAAJ) The Java API for XML Registries (JAXR) The Web-tier technology chapters cover the components used in developing the presentation layer of a J2EE or stand-alone Web application: Java Servlet JavaServer Pages (JSP) JavaServer Pages Standard Tag Library (JSTL) JavaServer Faces Web application internationalization and localization The Enterprise JavaBeans (EJB) technology chapters cover the components used in developing the business logic of a J2EE application: Session beans Entity beans Message-driven beans Enterprise JavaBeans Query Language The platform services chapters cover the system services used by all the J2EE component technologies: Transactions Resource connections Security Java Message Service After you have become familiar with some of the technology areas, you are ready to tackle the case studies, which tie together several of the technologies discussed in the tutorial. The Coffee Break Application (Chapter 35) describes an application that uses the Web application and Web services APIs. The Duke's Bank Application (Chapter 36) describes an application that employs Web application technologies and enterprise beans. Finally, the appendixes contain auxiliary information helpful to the J2EE application developer along with a brief summary of the J2EE Connector architecture: Java Encoding Schemes (Appendix A) XML standards (Appendix B) HTTP Overview (Appendix C) J2EE Connector Architecture (Appendix D) About the Examples This section tells you everything you need to know to install, build, and run the examples. Required Software Tutorial Bundle The tutorial example source is contained in the tutorial bundle, which is distributed on the accompanying CD-ROM. After you have installed the tutorial bundle, the example source code is in the /j2eetutorial14/examples/ directory, with subdirectories for each of the technologies discussed in the

Rewards Program