The J2EE(TM) Tutorial
by: Bodoff, Stephanie; Armstrong, Eric; Ball, Jennifer; Carson, Debbie; Evans, Ian; Green, Dale; Haase, Kim; Jendrock, Eric
The J2EE(TM) Tutorial
by: Bodoff, Stephanie; Armstrong, Eric; Ball, Jennifer; Carson, Debbie; Evans, Ian; Green, Dale; Haase, Kim; Jendrock, Eric
- ISBN 13:
9780321245755
- ISBN 10:
032124575X
- Edition: 2nd
- Format: Paperback w/CD
- Copyright: 01/01/2004
- Publisher: Prentice Hall PTR
- Newer Edition
Rent
Sorry, this item is currently unavailable.
Free Shipping On Every Order
Note: Supplemental materials are not guaranteed with Rental or Used book purchases.
Extend or Purchase Your Rental at Any Time
Need to keep your rental past your due date? At any time before your due date you can extend or purchase your rental through your account.
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
Read moreStephanie 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
Read moreForeword | p. xxxv |
About This Tutorial | p. xxxvii |
Overview | p. 1 |
Distributed Multitiered Applications | p. 2 |
J2EE Containers | p. 8 |
Web Services Support | p. 10 |
Packaging Applications | p. 12 |
Development Roles | p. 14 |
J2EE 1.4 Platform APIs | p. 16 |
Sun Java System Application Server Platform Edition 8 | p. 23 |
Understanding XML | p. 31 |
Introduction to XML | p. 31 |
Generating XML Data | p. 41 |
Designing an XML Data Structure | p. 74 |
Summary | p. 79 |
Getting Started with Web Applications | p. 81 |
Web Application Life Cycle | p. 84 |
Web Modules | p. 86 |
Configuring Web Applications | p. 95 |
Duke's Bookstore Examples | p. 100 |
Accessing Databases from Web Applications | p. 100 |
Further Information | p. 104 |
Java API for XML Processing | p. 105 |
The JAXP APIs | p. 105 |
An Overview of the Packages | p. 106 |
The Simple API for XML APIs | p. 107 |
The Document Object Model APIs | p. 110 |
The Extensible Stylesheet Language Transformations APIs | p. 111 |
Using the JAXP Libraries | p. 113 |
Where Do You Go from Here? | p. 113 |
Simple API for XML | p. 115 |
When to Use SAX | p. 116 |
Echoing an XML File with the SAX Parser | p. 117 |
Adding Additional Event Handlers | p. 135 |
Handling Errors with the Nonvalidating Parser | p. 139 |
Displaying Special Characters and CDATA | p. 147 |
Parsing with a DTD | p. 149 |
Choosing Your Parser Implementation | p. 155 |
Using the Validating Parser | p. 155 |
Parsing a Parameterized DTD | p. 162 |
Handling Lexical Events | p. 164 |
Using the DTDHandler and EntityResolver | p. 171 |
Further Information | p. 173 |
Document Object Model | p. 175 |
When to Use DOM | p. 176 |
Reading XML Data into a DOM | p. 182 |
Displaying a DOM Hierarchy | p. 189 |
Examining the Structure of a DOM | p. 205 |
Constructing a User-Friendly JTree from a DOM | p. 213 |
Creating and Manipulating a DOM | p. 228 |
Validating with XML Schema | p. 237 |
Further Information | p. 243 |
Extensible Stylesheet Language Transformations | p. 245 |
Introducing XSL, XSLT and XPath | p. 246 |
How XPath Works | p. 247 |
Writing Out a DOM as an XML File | p. 257 |
Generating XML from an Arbitrary Data Structure | p. 264 |
Transforming XML Data with XSLT | p. 278 |
Transforming from the Command Line with Xalan | p. 303 |
Concatenating Transformations with a Filter Chain | p. 303 |
Further Information | p. 311 |
Building Web Services with JAX-RPC | p. 313 |
Setting the Port | p. 314 |
Creating a Simple Web Service and Client with JAX-RPC | p. 314 |
Types Supported by JAX-RPC | p. 324 |
Web Service Clients | p. 326 |
Web Services Interoperability and JAX-RPC | p. 337 |
Further Information | p. 337 |
SOAP with Attachments API for Java | p. 339 |
Overview of SAAJ | p. 340 |
Tutorial | p. 345 |
Code Examples | p. 371 |
Further Information | p. 388 |
Java API for XML Registries | p. 389 |
Overview of JAXR | p. 389 |
Implementing a JAXR Client | p. 393 |
Running the Client Examples | p. 417 |
Using JAXR Clients in J2EE Applications | p. 425 |
Further Information | p. 434 |
Java Servlet Technology | p. 435 |
What Is a Servlet? | p. 435 |
The Example Servlets | p. 436 |
Servlet Life Cycle | p. 441 |
Sharing Information | p. 444 |
Initializing a Servlet | p. 447 |
Writing Service Methods | p. 448 |
Filtering Requests and Responses | p. 454 |
Invoking Other Web Resources | p. 460 |
Accessing the Web Context | p. 463 |
Maintaining Client State | p. 464 |
Finalizing a Servlet | p. 467 |
Further Information | p. 470 |
JavaServer Pages Technology | p. 471 |
What Is a JSP Page? | p. 471 |
The Example JSP Pages | p. 476 |
The Life Cycle of a JSP Page | p. 482 |
Creating Static Content | p. 486 |
Creating Dynamic Content | p. 487 |
Expression Language | p. 489 |
JavaBeans Components | p. 497 |
Using Custom Tags | p. 502 |
Reusing Content in JSP Pages | p. 506 |
Transferring Control to Another Web Component | p. 507 |
Including an Applet | p. 508 |
Setting Properties for Groups of JSP Pages | p. 510 |
Further Information | p. 513 |
JavaServer Pages Documents | p. 515 |
The Example JSP Document | p. 516 |
Creating a JSP Document | p. 521 |
Identifying the JSP Document to the Container | p. 535 |
JavaServer Pages Standard Tag Library | p. 537 |
The Example JSP Pages | p. 538 |
Using JSTL | p. 541 |
Core Tag Library | p. 543 |
XML Tag Library | p. 550 |
Internationalization Tag Library | p. 554 |
SQL Tag Library | p. 556 |
Functions | p. 561 |
Further Information | p. 562 |
Custom Tags in JSP Pages | p. 563 |
What Is a Custom Tag? | p. 564 |
The Example JSP Pages | p. 564 |
Types of Tags | p. 568 |
Encapsulating Reusable Content Using Tag Files | p. 573 |
Tag Library Descriptors | p. 589 |
Programming Simple Tag Handlers | p. 598 |
Scripting in JSP Pages | p. 617 |
The Example JSP Pages | p. 618 |
Using Scripting | p. 619 |
Disabling Scripting | p. 620 |
Declarations | p. 620 |
Scriptlets | p. 621 |
Expressions | p. 622 |
Programming Tags That Accept Scripting Elements | p. 623 |
JavaServer Faces Technology | p. 631 |
JavaServer Faces Technology Benefits | p. 633 |
What Is a JavaServer Faces Application? | p. 633 |
Framework Roles | p. 634 |
A Simple JavaServer Faces Application | p. 635 |
User Interface Component Model | p. 644 |
Navigation Model | p. 654 |
Backing Bean Management | p. 656 |
How the Pieces Fit Together | p. 659 |
The Life Cycle of a JavaServer Faces Page | p. 662 |
Further Information | p. 669 |
Using JavaServer Faces Technology in JSP Pages | p. 671 |
The Example JavaServer Faces Application | p. 672 |
Setting Up a Page | p. 676 |
Using the Core Tags | p. 678 |
Using the HTML Component Tags | p. 680 |
Using Localized Messages | p. 703 |
Using the Standard Converters | p. 705 |
Registering Listeners on Components | p. 710 |
Using the Standard Validators | p. 712 |
Binding Component Values and Instances to External Data Sources | p. 714 |
Referencing a Backing Bean Method | p. 719 |
Using Custom Objects | p. 723 |
Developing with JavaServer Faces Technology | p. 729 |
Writing Component Properties | p. 730 |
Performing Localization | p. 741 |
Creating a Custom Converter | p. 744 |
Implementing an Event Listener | p. 747 |
Creating a Custom Validator | p. 750 |
Writing Backing Bean Methods | p. 755 |
Creating Custom UI Components | p. 761 |
Determining Whether You Need a Custom Component or Renderer | p. 762 |
Understanding the Image Map Example | p. 765 |
Steps for Creating a Custom Component | p. 771 |
Creating the Component Tag Handler | p. 772 |
Defining the Custom Component Tag in a Tag Library Descriptor | p. 777 |
Creating Custom Component Classes | p. 778 |
Delegating Rendering to a Renderer | p. 786 |
Handling Events for Custom Components | p. 788 |
Configuring JavaServer Faces Applications | p. 791 |
Application Configuration Resource File | p. 792 |
Configuring Beans | p. 793 |
Registering Messages | p. 802 |
Registering a Custom Validator | p. 803 |
Registering a Custom Converter | p. 804 |
Configuring Navigation Rules | p. 805 |
Registering a Custom Renderer with a Render Kit | p. 808 |
Registering a Custom Component | p. 810 |
Basic Requirements of a JavaServer Faces Application | p. 811 |
Internationalizing and Localizing Web Applications | p. 819 |
Java Platform Localization Classes | p. 819 |
Providing Localized Messages and Labels | p. 820 |
Date and Number Formatting | p. 823 |
Character Sets and Encodings | p. 823 |
Further Information | p. 827 |
Enterprise Beans | p. 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 Interfaces | p. 840 |
The Contents of an Enterprise Bean | p. 845 |
Naming Conventions for Enterprise Beans | p. 846 |
The Life Cycles of Enterprise Beans | p. 847 |
Further Information | p. 851 |
Getting Started with Enterprise Beans | p. 853 |
Creating the J2EE Application | p. 854 |
Creating the Enterprise Bean | p. 854 |
Creating the Application Client | p. 858 |
Creating the Web Client | p. 863 |
Mapping the Enterprise Bean References | p. 866 |
Specifying the Web Client's Context Root | p. 868 |
Deploying the J2EE Application | p. 868 |
Running the Application Client | p. 869 |
Running the Web Client | p. 869 |
Modifying the J2EE Application | p. 870 |
Session Bean Examples | p. 873 |
The CartBean Example | p. 873 |
A Web Service Example: HelloServiceBean | p. 884 |
Other Enterprise Bean Features | p. 889 |
Using the Timer Service | p. 892 |
Handling Exceptions | p. 901 |
Bean-Managed Persistence Examples | p. 903 |
The SavingsAccountBean Example | p. 903 |
Mapping Table Relationships for Bean-Managed Persistence | p. 919 |
Primary Keys for Bean-Managed Persistence | p. 933 |
deploytool Tips for Entity Beans with Bean-Managed Persistence | p. 937 |
Container-Managed Persistence Examples | p. 939 |
Overview of the RosterApp Application | p. 939 |
The PlayerBean Code | p. 941 |
Method Invocations in RosterApp | p. 947 |
Building and Running the RosterApp Example | p. 958 |
A Guided Tour of the RosterApp Settings | p. 972 |
Primary Keys for Container-Managed Persistence | p. 980 |
Advanced CMP Topics: The OrderApp Example | p. 984 |
deploytool Tips for Entity Beans with Container-Managed Persistence | p. 1000 |
A Message-Driven Bean Example | p. 1003 |
Example Application Overview | p. 1003 |
The Application Client | p. 1004 |
The Message-Driven Bean Class | p. 1005 |
Deploying and Running SimpleMessageApp | p. 1007 |
deploytool Tips for Message-Driven Beans | p. 1010 |
deploytool Tips for Components That Send Messages | p. 1011 |
Enterprise JavaBeans Query Language | p. 1015 |
Terminology | p. 1016 |
Simplified Syntax | p. 1016 |
Example Queries | p. 1017 |
Full Syntax | p. 1022 |
EJB QL Restrictions | p. 1044 |
Transactions | p. 1045 |
What Is a Transaction? | p. 1045 |
Container-Managed Transactions | p. 1046 |
Bean-Managed Transactions | p. 1057 |
Summary of Transaction Options for Enterprise Beans | p. 1069 |
Transaction Timeouts | p. 1070 |
Isolation Levels | p. 1070 |
Updating Multiple Databases | p. 1071 |
Transactions in Web Components | p. 1073 |
Resource Connections | p. 1075 |
JNDI Naming | p. 1075 |
DataSource Objects and Connection Pools | p. 1077 |
Database Connections | p. 1078 |
Mail Session Connections | p. 1080 |
URL Connections | p. 1083 |
Further Information | p. 1086 |
Security | p. 1087 |
Overview | p. 1087 |
Realms, Users, Groups, and Roles | p. 1088 |
Web-Tier Security | p. 1092 |
Understanding Login Authentication | p. 1100 |
Installing and Configuring SSL Support | p. 1114 |
XML and Web Services Security | p. 1125 |
EJB-Tier Security | p. 1142 |
Application Client-Tier Security | p. 1145 |
EIS-Tier Security | p. 1147 |
Propagating Security Identity | p. 1149 |
What Is Java Authorization Contract for Containers? | p. 1151 |
Further Information | p. 1152 |
The Java Message Service API | p. 1153 |
Overview | p. 1154 |
Basic JMS API Concepts | p. 1157 |
The JMS API Programming Model | p. 1162 |
Writing Simple JMS Client Applications | p. 1173 |
Creating Robust JMS Applications | p. 1191 |
Using the JMS API in a J2EE Application | p. 1212 |
Further Information | p. 1220 |
J2EE Examples Using the JMS API | p. 1221 |
A J2EE Application That Uses the JMS API with a Session Bean | p. 1222 |
A J2EE Application That Uses the JMS API with an Entity Bean | p. 1231 |
An Application Example That Consumes Messages from a Remote J2EE Server | p. 1239 |
An Application Example That Deploys a Message-Driven Bean on Two J2EE Servers | p. 1246 |
The Coffee Break Application | p. 1255 |
Common Code | p. 1256 |
JAX-RPC Coffee Supplier Service | p. 1257 |
SAAJ Coffee Supplier Service | p. 1265 |
Coffee Break Server | p. 1280 |
JavaServer Faces Version of Coffee Break Server | p. 1284 |
Building, Packaging, Deploying, and Running the Application | p. 1290 |
The Duke's Bank Application | p. 1301 |
Enterprise Beans | p. 1302 |
Application Client | p. 1310 |
Web Client | p. 1318 |
Internationalization | p. 1327 |
Building, Packaging, Deploying, and Running the Application | p. 1328 |
Running the Clients | p. 1338 |
Java Encoding Schemes | p. 1341 |
Further Information | p. 1342 |
XML and Related Specs: Digesting the Alphabet Soup | p. 1343 |
Basic Standards | p. 1344 |
Schema Standards | p. 1348 |
Linking and Presentation Standards | p. 1350 |
Knowledge Standards | p. 1351 |
Standards That Build on XML | p. 1352 |
Summary | p. 1354 |
HTTP Overview | p. 1355 |
HTTP Requests | p. 1356 |
HTTP Responses | p. 1356 |
J2EE Connector Architecture | p. 1357 |
About Resource Adapters | p. 1357 |
Resource Adapter Contracts | p. 1359 |
Common Client Interface | p. 1362 |
Further Information | p. 1363 |
Glossary | p. 1365 |
About the Authors | p. 1403 |
Index | p. 1405 |
Table of Contents provided by Ingram. All Rights Reserved. |
Supplemental Materials
Read moreWhat 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
Read moreAbout 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
Write a Review
Currently unavailable