Struts: The Complete Reference, 2nd Edition

by
Edition: 2nd
Format: Paperback
Pub. Date: 2007-01-01
Publisher(s): McGraw-Hill Education
List Price: $56.70

Buy New

Usually Ships in 2-3 Business Days.
$54.00

Rent Book

Select for Price
There was a problem. Please try again later.

Rent Digital

Rent Digital Options
Online:1825 Days access
Downloadable:Lifetime Access
$60.75
*To support the delivery of the digital material to you, a digital delivery fee of $3.99 will be charged on each digital item.
$60.75*

Used Book

We're Sorry
Sold Out

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

Strut your stuff with this completely up-to-date guide Struts guru James Holmes has completely revised and updated his definitive, bestselling Struts volume. You will get soup-to-nuts coverage of Struts 1.3, the latest version of the framework used to create flexible, high-performance web applications. The book features insider tips, tricks, and techniques to make Struts applications sizzle.

Author Biography

James Holmes is a systems development consultant specializing in Java. In 2002, he was named Java Developer of the Year by Oracle Corporation for his work with the Struts framework.

Table of Contents

Acknowledgments xxi
Part I The Struts Framework
An Introduction to Struts
3(8)
A Brief History of Web Application Development
3(2)
Two Development Models
5(1)
Model 1 Architecture Overview
5(1)
Model 2 Architecture Overview
5(1)
A Closer Look at the Model-View-Controller Architecture
6(1)
Model Components
6(1)
View Components
6(1)
Controller Components
6(1)
Enter Struts
7(1)
The Evolution of Struts
7(1)
Struts Is Open Source
8(1)
Basic Components of Struts
8(2)
Base Framework
9(1)
JSP Tag Libraries
9(1)
Tiles Plugin
9(1)
Validator Plugin
9(1)
Acquiring Struts
10(1)
What You Get (Binary)
10(1)
What You Get (Source)
10(1)
Getting Started with Struts
10(1)
Building a Simple Struts Application
11(30)
Application Overview
11(21)
The Mini HR Application Files
11(2)
index.jsp
13(2)
search.jsp
15(6)
SearchForm.java
21(2)
SearchAction.java
23(2)
EmployeeSearchService.java
25(2)
Employee.java
27(1)
web.xml
28(1)
struts-config.xml
29(3)
MessageResources.properties
32(1)
Compiling, Packaging, and Running the Application
32(6)
Downloading and Installing Struts and Tomcat
33(1)
Compiling the Application
33(2)
Packaging the Application
35(1)
Running the Application
35(3)
Understanding the Flow of Execution
38(3)
The Model Layer
41(6)
What Is the Model?
41(1)
Model Layer Breakdown
41(1)
Struts and the Model
42(2)
Using BeanUtils to Transfer Data to Model Classes
42(2)
Reviewing the Model Layer of the Mini HR Application
44(3)
The View Layer
47(18)
Struts and the View Layer
47(13)
JSP Pages
48(1)
Form Beans
48(9)
JSP Tag Libraries
57(1)
Resource Bundles
58(2)
Reviewing the View Layer of the Mini HR Application
60(4)
Alternative View Technologies
64(1)
The Controller Layer
65(24)
Struts and the Controller Layer
65(1)
The ActionServlet Class
66(1)
The Request Processing Engine
67(4)
Jakarta Commons Chain-Based Request Processing
68(1)
RequestProcessor Class-Based Processing
69(2)
The Action Class
71(14)
Retrieving Values from Form Beans
71(2)
Customizing the Response from an Action
73(1)
Struts' Built-in Actions
73(12)
The ActionForward Class
85(1)
Reviewing the Controller Layer of the Mini HR Application
86(3)
Validator
89(42)
Validator Overview
89(1)
Using Validator
90(29)
Enabling the Validator Plugin
90(1)
Creating Form Beans
91(3)
Configuring validator-rules.xml
94(1)
Configuring the Application Resource Bundle File
95(2)
Configuring validation.xml
97(5)
Using Validator's Included Validations
102(14)
Enabling Client-Side Validations
116(3)
Creating Custom Validations
119(5)
Creating a Validation Method
119(2)
Adding a New Validation Rule
121(2)
Adding New Validation Definitions
123(1)
Adding Messages to the MessageResources.properties File
124(1)
Internationalizing Validations
124(2)
Adding Validator to the Mini HR Application
126(5)
Change SearchForm to Extend ValidatorForm
126(1)
Create a validation.xml File
127(1)
Add the Validator Plugin to the struts-config.xml File
128(1)
Add Validation Error Messages to the MessageResources.properties File
129(1)
Compile, Package, and Run the Updated Application
129(2)
Tiles
131(30)
Tiles Overview
133(1)
Using Tiles
133(7)
Enabling the Tiles Plugin
133(1)
Creating Tiles Definitions
134(4)
Creating Layout JSPs and Using the Tiles Tag Library
138(1)
Creating Content JSPs
138(1)
Using the Tiles Definitions
139(1)
Handling Relative URLS with Tiles
140(1)
Internationalizing Tiles
140(3)
Using the Tiles Tag Library
143(1)
The Tiles Tag Library Tags
143(10)
The add Tag
145(1)
The definition Tag
146(1)
The getAsString Tag
147(1)
The importAttribute Tag
147(1)
The initComponentDefinitions Tag
148(1)
The insert Tag
148(2)
The put Tag
150(1)
The putList Tag
151(1)
The useAttribute Tag
152(1)
Adding Tiles to the Mini HR Application
153(8)
Create Layout JSPs
153(2)
Update Existing JSPs to Work with Layouts
155(2)
Create a tiles-defs.xml Tiles Configuration File
157(1)
Update the struts-config.xml Struts Configuration File
158(2)
Repackage and Run the Updated Application
160(1)
Declarative Exception Handling
161(12)
Configuring Struts' Exception Handler
161(2)
Exception Handling for Committed Responses
162(1)
Creating a Custom Exception Handler
163(3)
Create a New Exception Handler Class
164(2)
Add New Exception Handler Definitions to the Application's Struts Configuration File
166(1)
Adding Declarative Exception Handling to the Mini HR Application
166(7)
Create an Application Exception Class
167(1)
Update SearchAction to Throw an Application Exception
167(1)
Set Up an Exception Handler in the struts-config.xml Configuration File
168(2)
Create an Exception Handler JSP
170(1)
Add an Exception Error Message to the MessageResources.properties File
170(1)
Recompile, Repackage, and Run the Updated Application
171(2)
Struts Modules
173(14)
Using Modules
174(3)
Creating a Struts Configuration File for Each Module
174(1)
Configuring the web.xml Deployment Descriptor for Modules
175(1)
Configuring Links to Access Module-Specific JSPs
176(1)
Using Validator with Modules
177(1)
Using Tiles with Modules
177(1)
Converting the Mini HR Application to Use Modules
178(9)
Set Up Module Directories and Files
179(1)
Create a Struts Configuration File for Each Module
180(1)
Update the Application's web.xml Deployment Descriptor File
181(2)
Update the index.jsp File to Link to Each of the Modules
183(1)
Repackage and Run the Updated Application
183(4)
Part II Applying Struts
Internationalizing Struts Applications
187(14)
Understanding Java's Internationalization Support
187(3)
The java.util.Locale Class
188(1)
The java.util.ResourceBundle Class
189(1)
The java.text.MessageFormat Class
190(1)
Understanding Struts' Internationalization Support
190(4)
Locale
191(1)
Message Resources
191(2)
Struts' Tag Library Support for Internationalization
193(1)
Internationalizing the Mini HR Application
194(1)
Add Entries for All Application Text to the MessageResources.properties Resource Bundle File
195(1)
Create a Spanish Version of the MessageResources.properties File
195(1)
Update JSPs to Retrieve All Application Text from the MessageResources.properties File
196(2)
Repackage and Run the Updated Application
198(3)
Securing Struts Applications
201(24)
Levels of Security
201(3)
Providing Secure Communications
201(1)
Authentication and Authorization
202(1)
Role-Based Access Control
202(1)
Container- vs. Application-Managed Security
202(2)
Using Container-Managed Security
204(7)
Login Configurations
205(5)
Container-Managed Secure Transport
210(1)
Application-Managed Security
211(14)
Creating a Security Service
211(10)
Integrating Struts with SSL
221(4)
Testing Struts Applications
225(26)
Types of Testing
225(1)
Unit Testing
225(1)
Functional Testing
226(1)
System Testing
226(1)
Unit Testing Struts Applications
226(14)
Testing the Model
227(3)
Testing Controller Behavior
230(8)
Testing the View
238(2)
Use-Case-Driven Testing
240(5)
Creating Test Cases
241(1)
Using Canoo WebTest
242(3)
Testing Application Performance
245(6)
Part III The Struts Tag Libraries
The HTML Tag Library
251(60)
Understanding Variables and Scope in JSP Pages
251(1)
Using the HTML Tag Library
252(1)
The HTML Tag Library Tags
253(54)
The base Tag
255(1)
The button Tag
256(1)
The cancel Tag
257(2)
The checkbox Tag
259(1)
The errors Tag
260(2)
The file Tag
262(2)
The form Tag
264(2)
The frame Tag
266(4)
The hidden Tag
270(1)
The html Tag
271(1)
The image Tag
272(2)
The img Tag
274(4)
The javascript Tag
278(2)
The link Tag
280(3)
The messages Tag
283(2)
The multibox Tag
285(2)
The option Tag
287(1)
The options Tag
287(2)
The optionsCollection Tag
289(1)
The password Tag
290(2)
The radio Tag
292(2)
The reset Tag
294(2)
The rewrite Tag
296(3)
The select Tag
299(2)
The submit Tag
301(1)
The text Tag
302(2)
The textarea Tag
304(3)
The xhtml Tag
307(1)
Common Tag Attributes
307(4)
The Bean Tag Library
311(22)
Understanding Variables and Scope in JSPs
311(1)
Using the Bean Tag Library
312(1)
The Bean Tag Library Tags
313(20)
The cookie Tag
314(2)
The define Tag
316(2)
The header Tag
318(2)
The include Tag
320(1)
The message Tag
321(2)
The page Tag
323(1)
The parameter Tag
324(2)
The resource Tag
326(1)
The size Tag
327(2)
The struts Tag
329(2)
The write Tag
331(2)
The Logic Tag Library
333(40)
Understanding Variables and Scope in JSPs
333(1)
Using the Logic Tag Library
334(1)
The Logic Tag Library Tags
335(38)
The empty Tag
337(1)
The equal Tag
338(2)
The forward Tag
340(1)
The greaterEqual Tag
341(2)
The greaterThan Tag
343(2)
The iterate Tag
345(3)
The lessEqual Tag
348(2)
The lessThan Tag
350(2)
The match Tag
352(3)
The messagesNotPresent Tag
355(1)
The messagesPresent Tag
356(1)
The notEmpty Tag
356(1)
The notEqual Tag
357(3)
The notMatch Tag
360(2)
The notPresent Tag
362(3)
The present Tag
365(2)
The redirect Tag
367(6)
The Nested Tag Library
373(8)
Understanding Object Nesting in Struts
373(1)
Using the Nested Tag Library
374(1)
The Nested Tag Library Tags
375(6)
The nest Tag
377(1)
The root Tag
378(1)
The writeNesting Tag
379(2)
Using JSTL with Struts
381(18)
JSTL Overview
381(6)
The JSTL Expression Language
382(3)
The JSTL Tag Libraries
385(2)
Using JSTL with Struts
387(12)
JSTL Replacement Examples
389(3)
Using the Struts EL Tag Libraries
392(1)
The Struts EL Tag Library Tags
393(6)
Part IV Struts Configuration Files
The Struts Configuration File
399(20)
Understanding XML DTDs
399(1)
Configuring the web.xml Deployment Descriptor
400(1)
The Struts Configuration File Tags
401(16)
The action Tag
402(3)
The action-mappings Tag
405(1)
The controller Tag
405(3)
The exception Tag
408(1)
The form-bean Tag
409(1)
The form-beans Tag
410(1)
The form-property Tag
411(1)
The forward Tag
412(1)
The global-exceptions Tag
413(1)
The global-forwards Tag
413(1)
The message-resources Tag
414(1)
The plug-in Tag
415(1)
The set-property Tag
416(1)
The struts-config Tag
416(1)
Metadata Tags
417(1)
Editing Struts Configuration Files with Struts Console
417(2)
The Tiles Configuration File
419(10)
Understanding XML DTDs
419(1)
Enabling the Tiles Plugin
420(1)
The Tiles Configuration File Tags
421(6)
The add Tag
422(1)
The bean Tag
422(1)
The definition Tag
423(1)
The item Tag
424(1)
The put Tag
425(1)
The putList Tag
425(1)
The set-property Tag
426(1)
The tiles-definitions Tag
427(1)
Metadata Tags
427(1)
Editing Tiles Configuration Files with Struts Console
428(1)
The Validator Configuration Files
429(18)
Two Configuration Files
429(1)
Understanding XML DTDs
430(1)
Enabling the Validator Plugin
430(1)
The Validator Configuration File Tags
431(12)
The arg Tag
432(1)
The constant Tag
433(1)
The constant-name Tag
434(1)
The constant-value Tag
434(1)
The field Tag
434(1)
The form Tag
435(1)
The form-validation Tag
436(1)
The formset Tag
436(2)
The global Tag
438(1)
The javascript Tag
438(1)
The msg Tag
439(1)
The validator Tag
440(1)
The var Tag
441(1)
The var-jstype Tag
442(1)
The var-name Tag
442(1)
The var-value Tag
443(1)
Editing Validator Configuration Files with Struts Console
443(4)
Part V Struts Extensions
Struts Scripting
447(10)
Bean Scripting Framework Overview
447(1)
Struts Scripting Overview
448(1)
Using Struts Scripting
448(5)
Adding the Struts Scripting .jar Files and Properties File to the Application
449(1)
Creating Script-Based Actions
450(1)
Configuring Script-Based Actions in the Application's Struts Configuration File
450(1)
Predefined Scripting Variables
451(2)
Using Struts Scripting with the Mini HR Application
453(4)
Add the Struts Scripting .jar Files and Properties File to the Application
454(1)
Convert SearchAction to a Groovy Script
454(1)
Configure the struts-config.xml File
455(1)
Repackage and Run the Updated Application
456(1)
The Struts-Faces Integration Library
457(28)
JSF Overview
457(1)
Struts-Faces Library Overview
457(1)
Supported Versions of Struts
458(1)
Supported Versions of JSF
458(1)
Using the Struts-Faces Library
458(4)
Adding the Required .jar Files to the Application
459(1)
Adding a Servlet Definition for the JSF Controller Servlet to the web.xml File
459(1)
Configuring Struts to Use a Custom Struts-Faces Request Processor
460(1)
Using the Struts-Faces and JSF Tag Library Tags to Create JSF-Based User Interfaces
460(1)
Configuring Forward and Action Definitions in the Application's Struts Configuration File
461(1)
Known Limitations
461(1)
The Struts-Faces Tag Library Tags
462(15)
The base Tag
463(1)
The commandLink Tag
464(3)
The errors Tag
467(2)
The form Tag
469(1)
The html Tag
470(1)
The javascript Tag
471(2)
The loadMessages Tag
473(1)
The message Tag
474(2)
The stylesheet Tag
476(1)
The write Tag
476(1)
Using the Struts-Faces Library with the Mini HR Application
477(8)
Add a JSF Implementation's and JSTL .jar Files to the Application
478(1)
Add a Servlet Definition for the JSF Controller Servlet to the web.xml File
478(2)
Configure the struts-config.xml File
480(1)
Update Existing JSPs to Use the Struts-Faces and JSF Tag Library Tags
481(2)
Repackage and Run the Updated Application
483(2)
Using AJAX with Struts
485(12)
AJAX Overview
485(1)
Integrating AJAX with the Mini HR Application
486(11)
Add getEmployeeCount() to EmployeeSearchService
486(1)
Create a CountAction Class
487(1)
Configure the CountAction Class in the struts-config.xml File
488(1)
Update search.jsp to Use AJAX
489(3)
Recompile, Repackage, and Run the Updated Application
492(5)
Part VI Appendixes
Struts Console Quick Reference
497(18)
Supported Configuration Files
498(2)
Acquiring and Installing Struts Console
500(1)
Using Struts Console as a Stand-Alone Application
500(1)
Using Struts Console Inside Borland JBuilder
501(2)
Using Struts Console Inside Eclipse
503(2)
Using Struts Console Inside IBM Rational Application Developer for WebSphere
505(2)
Using Struts Console Inside IntelliJ IDEA
507(2)
Using Struts Console Inside NetBeans and Sun Java Studio
509(2)
Using Struts Console Inside Oracle JDeveloper
511(2)
Configuring the Struts Console Output Options
513(2)
Third-Party Struts Extensions
515(2)
Strecks
515(1)
SSLFXT
515(1)
Struts Menu
516(1)
displaytag
516(1)
stxx
516(1)
formdef
516(1)
Struts Layout
516(1)
Struts Console
516(1)
Index 517

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.