O'reilly Jakarta Struts.Pdf

O'reilly Jakarta Struts.Pdf

Copyright (c) 2002 O'Reilly and Associates, Inc. All rights reserved. The Book The OReilly Struts book (title not set yet) will be available sometime in the 3rd quarter of 2002. Published by OReilly, this book covers both Struts 1.0 and 1.1. The beta or draft chapters are being made available for download to facilitate an early public review process for the material. The Author Chuck Cavaness is a Senior Technologist at the S1 Corporation. His expertise spans server-side Java, distributed object computing, and application servers. Chuck is the most recent moderator for the "Java in the Enterprise" discussion forum hosted by JavaWorld. He spent several years writing Smalltalk and CORBA applications, and he has taught courses in object-oriented programming at Georgia Tech. He's written articles for JavaWorld and InformIt.com. He has also been the technical editor for many J2EE books, including Using JavaServer Pages and Servlets (Que 2000) and Special Edition Using Java 2 Enterprise Edition (Que 2001). Chuck earned his degree in computer science from Georgia Tech. His current interests focus on building presentation-tier frameworks based on the Apache Struts project. Chuck is the co-author of Special Edition Using Enterprise JavaBeans 2.0 (Que, 2001) and Special Edition Using Java 2 Standard Edition (Que, 2000). His next book, Struts (O'Reilly, 2002), will be available sometime in the 3rd quarter. Spread to you by Asmodeous <[email protected]> 1 Copyright (c) 2002 O'Reilly and Associates, Inc. All rights reserved. Table of Contents Chapter 1 Introduction...............................................................................9 Brief History of the Web ................................................................................................ 9 What are Java Servlets?................................................................................................ 11 JavaServer Pages Technology ...................................................................................... 14 JSP Model 1 and Model 2 Architectures ...................................................................... 16 Why is Model-View-Controller So Important?............................................................ 18 What is a Framework?.................................................................................................. 20 Creation of the Struts Framework ................................................................................ 21 Alternatives to Struts .................................................................................................... 22 Chapter 2 Inside the Web Tier ................................................................29 An Architecture Overview ........................................................................................... 29 The HTTP Request/Response Phase ............................................................................ 34 Struts and Scope ........................................................................................................... 40 Using URL Parameters................................................................................................. 42 Forward versus Redirect............................................................................................... 42 2 Copyright (c) 2002 O'Reilly and Associates, Inc. All rights reserved. Chapter 3 Overview of the Struts Framework ......................................51 A Banking Account Example....................................................................................... 51 Looking at the Big Picture............................................................................................ 57 Struts Controller Components ...................................................................................... 58 Struts Model Components ............................................................................................ 66 The Struts View Components....................................................................................... 70 Multiple Application Support....................................................................................... 81 Summary ...................................................................................................................... 81 Chapter 4 Configuring the Struts Application ......................................83 Introduction to the Storefront Application ................................................................... 83 What is a Web Application?......................................................................................... 85 The Web Application Directory Structure.................................................................... 86 Web Application Deployment Descriptor .................................................................... 88 Configuring the web.xml file for Struts ........................................................................ 91 The Struts Configuration File..................................................................................... 101 The org.apache.struts.config Package........................................................................ 102 Struts Console Tool.................................................................................................... 121 Reloading the Configuration Files.............................................................................. 122 Chapter 5 Struts Controller Components ............................................123 3 Copyright (c) 2002 O'Reilly and Associates, Inc. All rights reserved. The Controller Mechanism......................................................................................... 124 The Utilities Classes................................................................................................... 151 Chapter 6 Struts Model Components ...................................................155 The “M” in MVC ....................................................................................................... 155 What is a Business Object? ........................................................................................ 160 Persistence.................................................................................................................. 162 What does Struts Offer For the Model?...................................................................... 163 Building the Storefront Model.................................................................................... 164 Chapter 7 Struts View Components......................................................190 What exactly is a View?............................................................................................. 190 What are ActionForms?.............................................................................................. 197 Using ActionErrors..................................................................................................... 207 Performing Presentation Validation ........................................................................... 212 Using Dynamic ActionForms..................................................................................... 213 Looking Ahead to JavaServer Faces .......................................................................... 215 Chapter 9 Extending the Struts Framework........................................218 What are Extension Points?........................................................................................ 218 General Extension Points ........................................................................................... 219 Controller Extension Points........................................................................................ 222 4 Copyright (c) 2002 O'Reilly and Associates, Inc. All rights reserved. Extending View Components..................................................................................... 227 Extending the Model Components ............................................................................. 228 Downsides to Extending the Framework.................................................................... 231 Chapter 10 Exception Handling ..............................................................232 Java Exception Handling............................................................................................ 232 System versus Application Exceptions....................................................................... 237 Using Chained Exceptions ......................................................................................... 238 Exception Handling provided by Struts...................................................................... 241 Tying Up the Loose Ends........................................................................................... 253 Exceptions in Custom Tags........................................................................................ 254 Internationalized Exception Handling ........................................................................ 254 Conclusion.................................................................................................................. 255 Chapter 11 Using the Struts Validator ...................................................256 The Need for a Validation Framework....................................................................... 256 Installing and Configuring the Validator.................................................................... 257 Overview of Regular Expressions .............................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    417 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us