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
Table of Contents:
About This Tutorial xxxi 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
Chapter 1: Overview 1 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
Part One: The Web Tier 31 Chapter 2: Getting Started with Web Applications 33 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
Chapter 3: Java Servlet Technology 59 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
Chapter 4: JavaServer Pages Technology 97 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
Chapter 5: JavaServer Pages Documents 155 The Example JSP Document 156
Creating a JSP Document 158
Identifying the JSP Document to the Container 173
Chapter 6: JavaServer Pages Standard Tag Library 175 The Example JSP Pages 176
Using JSTL 177
Core Tag Library 180
XML Tag Library 188
Internationalization Tag Library 192
SQL Tag Library &nbs