rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780764558375

Professional Jakarta Struts

by ;
  • ISBN13:

    9780764558375

  • ISBN10:

    0764558374

  • Copyright: 2003-11-01
  • Publisher: Wrox
  • 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: $39.99
We're Sorry.
No Options Available at This Time.

Summary

What is this book about? The Apache Software Foundation's Jakarta Struts remains the most popular Java framework for building enterprise-level Web applications. In the first book to cover the extensive new features of the final release of Struts 1.1, the authors present the technical and conceptual information you need to design, build, and deploy sophisticated Struts 1.1 applications. What does this book cover? This book covers everything you need to know about Struts and its supporting technologies, including JSPs, servlets, Web applications, the Jakarta-Tomcat JSP/servlet container, and much more. Here are just a few of the things you'll find in this book: The Jakarta Struts Model 2 architecture and its supporting components How to get started with Struts and build your own components How to work with the Commons Validator, ActionForms, and DynaActionForms Techniques for customizing the Controlle Ways to maximize your presentation pages with Tiles How to internationalize your Struts applications Tips for managing errors and debugging Struts applications Who is this book for? This book is for Java developers who want to build sophisticated, enterprise-level Web applications using the final production release of Struts 1.1.

Table of Contents

Acknowledgmentsp. ix
Introductionp. x
Introducing the Jakarta Struts Project and Its Supporting Componentsp. 1
The Jakarta Struts Projectp. 1
Understanding the MVC Design Patternp. 2
The Struts Implementation of the MVCp. 3
Web Applicationsp. 5
The Directory Structurep. 6
The Web Application Deployment Descriptorp. 7
Packaging a Web Applicationp. 8
The Tomcat JSP/Servlet Containerp. 8
Installing and Configuring Tomcatp. 8
Testing Your Tomcat Installationp. 9
What's Next?p. 11
An Overview of the Java Servlet and JavaServer Pages Architecturesp. 13
The Java Servlet Architecturep. 13
The GenericServlet and HttpServlet Classesp. 15
The Lifecycle of a Servletp. 15
Building a Servletp. 16
The ServletContextp. 25
Using Servlets to Retrieve HTTP Datap. 25
What Are JavaServer Pages?p. 30
The Components of a JavaServer Pagep. 31
What's Nextp. 53
Getting Started with Strutsp. 55
Obtaining and Installing the Jakarta Struts Archivep. 55
Creating Your First Struts Applicationp. 56
Creating the Viewsp. 57
Creating the Controller Componentsp. 62
Deploying Your Struts Applicationp. 66
Walking through the ch03app Web Applicationp. 68
What's Nextp. 71
Actions and ActionServletp. 73
The ActionServlet Classp. 73
Configuring the ActionServletp. 75
The Action Classp. 78
Extending the Action Classp. 79
Implementing the execute() Methodp. 79
Configuring the Action Classp. 81
Struts Pluginsp. 83
init()p. 84
destroy()p. 84
Creating a Pluginp. 84
Configuring a Pluginp. 86
The RequestProcessorp. 87
Creating Your Own RequestProcessorp. 87
Configuring an Extended RequestProcessorp. 89
What's Nextp. 90
Advanced Action Classesp. 91
ForwardAction and Beyondp. 91
Linking to JSP Directly: More than Just Bad Designp. 92
Linking to Global Forwards Instead of Actionsp. 92
Using the forward Attribute vs. ForwardActionp. 93
Don't Bleed Your V into Your Cp. 94
Forwards for Legacy Accessp. 94
IncludeActionp. 96
DispatchActionp. 97
LookupDispatchActionp. 100
SwitchActionp. 102
What's Nextp. 104
Building the Presentation Layerp. 105
Building a Struts Viewp. 105
JSPs That Gather Datap. 106
ActionForm Beansp. 109
The Steps of a Struts Form Submissionp. 110
An Alternative ActionForm:DynaActionForm Beanp. 111
What's Nextp. 116
Debugging Struts Applicationsp. 117
Eclipsep. 117
Installing the Tomcat Pluginp. 118
Debugging Your Struts Application with Eclipsep. 121
IntelliJp. 129
Configuring Tomcatp. 129
Configuring IntelliJp. 130
What's Next?p. 141
Working with Custom ActionMappingsp. 143
What Is an ActionMapping?p. 143
Creating a Custom ActionMappingp. 145
Creating an ActionMapping Extension for the wroxstruts Applicationp. 146
Using the ch08.WROXActionMapping Extension in the worxapp Applicationp. 147
Deploying the ch08.WROXActionMapping Extensionp. 148
What's Nextp. 150
Internationalizing Your Struts Applicationsp. 151
i18n Components of a Struts Applicationp. 151
The Controllerp. 151
The Viewp. 153
Internationalizing the worxapp Applicationp. 154
What's Nextp. 158
Managing Errorsp. 159
Struts Error Managementp. 159
ActionErrorp. 159
ActionErrorsp. 161
Adding Error Handling to the wroxapp Applicationp. 162
The ActionForm.validate() Methodp. 163
[left angle bracket]html:errors/[right angle bracket]p. 165
Error Management in the Action.execute() Methodp. 167
What's Next?p. 170
Integrating the Jakarta Commons Database Connection Pool (DBCP)p. 171
What Is the Commons DBCP?p. 171
Integrating the DBCP into Your Struts Applicationp. 171
Creating a Sample Databasep. 172
Using the DBCP in Your Struts Applicationp. 173
What's Nextp. 179
Working with the Validatorp. 181
Getting Started with the Validator Frameworkp. 182
Understanding the Standard Stepsp. 183
Understanding the Validator Frameworkp. 186
An Overview of the Standard Rulesp. 190
Using Two Rules on the Same Field (the maxfield Rule)p. 190
Using the Mask Rulep. 192
Constantsp. 195
Working with Datesp. 196
Making Fields Requiredp. 197
Working with E-Mail and Credit Cardsp. 197
Extending Validate and Custom Validation in the Validate Method of an Actionp. 198
Writing Your Own Rulesp. 199
Working with DynaActionFormsp. 203
Working with Client-Side JavaScriptp. 204
Canceling JavaScript validatep. 205
Using a Workflow Formp. 205
i18n for Validationp. 213
Summaryp. 213
Using Tilesp. 215
The Tiles Frameworkp. 216
Clarification of Termsp. 216
Creating a Tile Layoutp. 219
Using a Tile Layoutp. 222
Creating a Definitionp. 224
Creating and Using a JSP Definitionp. 224
Creating and Using an XML Definitionp. 227
Understanding Tile Scopep. 228
Understanding Listsp. 232
Using putList in XMLp. 232
Using the List in the Tile Layoutp. 233
Using putList in JSPp. 235
Extending Definitionsp. 236
Nesting Tilesp. 237
Creating a Visual Componentp. 238
Using the Visual Componentp. 239
Using a Tile as a Parameter to Another Tilep. 239
Tile Controllersp. 240
Using a Tile as an ActionForwardp. 242
What's Nextp. 243
Developing a Complete Struts Applicationp. 245
The Employees Application Definitionp. 245
Preparing the employees Applicationp. 245
Creating the employees Modelp. 250
Building the Employees Applicationp. 261
Walkthroughp. 287
What's Next?p. 289
The struts-config.xml Filep. 291
The Struts Sub-Elementsp. 292
The [left angle bracket]icon/[right angle bracket] Sub-Elementp. 293
The [left angle bracket]display-name/[right angle bracket] Sub-Elementp. 294
The [left angle bracket]description/[right angle bracket] Sub-Elementp. 294
The [left angle bracket]set-property/[right angle bracket] Sub-Elementp. 294
Adding a DataSourcep. 295
Adding FormBean Definitionsp. 296
Adding Global Exceptionsp. 297
Adding Global Forwardsp. 298
Adding Actionsp. 299
Adding Controller Elementsp. 301
Adding Message Resourcesp. 302
Adding Pluginsp. 303
What's Nextp. 303
The HTML Tag Libraryp. 305
Installing the HTML Tagsp. 305
[left angle bracket]html:base/[right angle bracket]p. 306
[left angle bracket]html:button/[right angle bracket]p. 306
[left angle bracket]html:cancel/[right angle bracket]p. 308
[left angle bracket]html:checkbox/[right angle bracket]p. 309
[left angle bracket]html:errors/[right angle bracket]p. 311
[left angle bracket]html:file/[right angle bracket]p. 312
[left angle bracket]html:form/[right angle bracket]p. 314
[left angle bracket]html:hidden/[right angle bracket]p. 315
[left angle bracket]html:html/[right angle bracket]p. 316
[left angle bracket]html:image/[right angle bracket]p. 317
[left angle bracket]html:img/[right angle bracket]p. 319
[left angle bracket]html:javascript/[right angle bracket]p. 321
[left angle bracket]html:link/[right angle bracket]p. 322
[left angle bracket]html:messages/[right angle bracket]p. 325
[left angle bracket]html:multibox/[right angle bracket]p. 325
[left angle bracket]html:option/[right angle bracket]p. 327
[left angle bracket]html:options/[right angle bracket]p. 328
[left angle bracket]html:optionsCollection/[right angle bracket]p. 329
[left angle bracket]html:password/[right angle bracket]p. 329
[left angle bracket]html:radio/[right angle bracket]p. 331
[left angle bracket]html:reset/[right angle bracket]p. 333
[left angle bracket]html:rewrite/[right angle bracket]p. 335
[left angle bracket]html:select/[right angle bracket]p. 336
[left angle bracket]html:submit/[right angle bracket]p. 338
[left angle bracket]html:text/[right angle bracket]p. 339
[left angle bracket]html:textarea/[right angle bracket]p. 341
[left angle bracket]html:xhtml/[right angle bracket]p. 343
The Tiles Tag Libraryp. 345
Installing the Tiles Tagsp. 345
[left angle bracket]tiles:insert/[right angle bracket]p. 346
[left angle bracket]tiles:definition/[right angle bracket]p. 347
[left angle bracket]tiles:put/[right angle bracket]p. 347
[left angle bracket]tiles:putList/[right angle bracket]p. 348
[left angle bracket]tiles:add/[right angle bracket]p. 349
[left angle bracket]tiles:get/[right angle bracket]p. 349
[left angle bracket]tiles:getAsString/[right angle bracket]p. 350
[left angle bracket]tiles:useAttribute/[right angle bracket]p. 350
[left angle bracket]tiles:importAttribute/[right angle bracket]p. 350
[left angle bracket]tiles:initComponentDefinitions/[right angle bracket]p. 351
The Logic Tag Libraryp. 353
Installing the Logic Tagsp. 353
[left angle bracket]logic:empty/[right angle bracket]p. 354
[left angle bracket]logic:notEmpty/[right angle bracket]p. 354
[left angle bracket]logic:equal/[right angle bracket]p. 355
[left angle bracket]logic:notEqual/[right angle bracket]p. 356
[left angle bracket]logic:forward/[right angle bracket]p. 356
[left angle bracket]logic:redirect/[right angle bracket]p. 357
[left angle bracket]logic:greaterEqual/[right angle bracket]p. 358
[left angle bracket]logic:greaterThan/[right angle bracket]p. 359
[left angle bracket]logic:iterate/[right angle bracket]p. 359
[left angle bracket]logic:lessEqual/[right angle bracket]p. 361
[left angle bracket]logic:lessThan/[right angle bracket]p. 361
[left angle bracket]logic:match/[right angle bracket]p. 362
[left angle bracket]logic:notMatch/[right angle bracket]p. 363
[left angle bracket]logic:present/[right angle bracket]p. 364
[left angle bracket]logic:notPresent/[right angle bracket]p. 365
The Template Tag Libraryp. 367
Installing the Template Tagsp. 367
[left angle bracket]template:get/[right angle bracket]p. 368
[left angle bracket]template:insert/[right angle bracket]p. 369
[left angle bracket]template:put/[right angle bracket]p. 369
The Bean Tag Libraryp. 371
Installing the Bean Tagsp. 371
[left angle bracket]bean:cookie/[right angle bracket]p. 372
[left angle bracket]bean:define/[right angle bracket]p. 372
[left angle bracket]bean:header/[right angle bracket]p. 374
[left angle bracket]bean:include/[right angle bracket]p. 374
[left angle bracket]bean:message/[right angle bracket]p. 375
[left angle bracket]bean:page/[right angle bracket]p. 376
[left angle bracket]bean:parameter/[right angle bracket]p. 377
[left angle bracket]bean:resource/[right angle bracket]p. 378
[left angle bracket]bean:size/[right angle bracket]p. 378
[left angle bracket]bean:struts/[right angle bracket]p. 379
[left angle bracket]bean:write/[right angle bracket]p. 380
Struts Cookbookp. 381
Action Helper Methodsp. 381
Action saveToken and isTokenValidp. 381
Action isCancelledp. 385
Action getLocale and setLocalep. 386
Action saveMessages and getResourcesp. 387
Populating ActionForms with Domain Objectsp. 390
Uploading Filesp. 391
Context-Sensitive Error Messagesp. 392
Best Practicesp. 397
i18n Best Practicesp. 397
Read the DTDsp. 397
Read the Sourcep. 398
Understand MVC, Model 2, Sun's Blueprints for J2EE, and J2EE design patternsp. 398
Don't Use Java Scriptlets in JSP ([left angle bracket]% %[right angle bracket])p. 398
Limit the Logic in Your JSPsp. 398
Create Multiple Resource Bundles per Modulep. 399
Break Up Your struts-config.xml Filep. 399
Break Your Application Up into Modulesp. 399
Use html:messages instead of html:errorsp. 400
Develop Your Own Custom Tagsp. 400
Declaratively Handle Exceptionsp. 400
For Visual Components, Use Tile Layoutsp. 402
Start Using Tilesp. 402
Start Using the Validator Frameworkp. 402
Group Related Actionsp. 402
Never Link to a JSPp. 404
Extend Actions with Action Chainingp. 404
Don't Use DynaActionForms without the Validator Frameworkp. 404
Use JSTL instead of Struts-Equivalent Tagsp. 405
Use JSTL EL in Your Custom Tagsp. 407
Useful Related Utilitiesp. 409
Cactusp. 409
StrutsTestCasep. 413
XDocletp. 413
Indexp. 419
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.

Rewards Program