Home > Store > Programming > Java

larger cover

Add To My Wish List

Struts Kick Start

  • By James Turner, Kevin Bedell
  • Published Dec 9, 2002 by Sams. Part of the Kick Start series.
    • Copyright 2003
    • Dimensions: 7-3/8" x 9-1/8"
    • Pages: 504
    • Edition: 1st
    • Book
    • ISBN-10: 0-672-32472-5
    • ISBN-13: 978-0-672-32472-7
    • eBook (Adobe DRM)
    • ISBN-10: 0-7686-6320-2
    • ISBN-13: 978-0-7686-6320-4

Register your product to gain access to bonus material or receive a coupon.

  • Description
  • Extras
  • Reviews
  • Sample Content

Product Author Bios

James Turner is the manager of Black Bear Software, LLC, and the Apache Jakarta Struts project. He has more than 22 years of experience in the computer field and has worked for organizations that include MIT, Xerox, Solbourne Computer, BBN Planet, and Interleaf. He spent the last seven years managing and implementing e-commerce Web sites for companies including CVS, The Christian Science Monitor, and Woolworths UK. In addition, he is an active contributor to various Apache Jakarta projects and recently was the Release Manager for the Jakarta Commons Validator 1.0 release. Mr. Turner is also a well-published freelance journalist and technology writer who has written for publications including The Christian Science Monitor, WIRED, and Web Developers Journal. He lives in Derry, New Hampshire, in a 200-year-old colonial farmhouse along with his wife and son. James is also the author of MySQL and JSP Web Applications: Data Driven Programming Using Tomcat and MySQL, published in 2002 by Sams Publishing.

Kevin Bedell is an E-Business Systems Architect with Sun Life Financial in Wellesley, Massachusetts. His career has crossed a number of different fields including programming, consulting, IT management, network integration, and corporate finance and accounting. In the software development world, he worked for large and small companies including Oracle, Johnson Controls, and Sun Life Financial. He's a Sun Certified Java Programmer and has earned his MCSE certification from Microsoft. Kevin holds a BS in engineering from Michigan Tech and an MBA from the Crummer Graduate School of Business at Rollins College in Winter Park, Florida.

Learn to build applications with Jakarta Struts, the most popular JSP development framework. Struts Kick Start is a "hands-on" book filled with sample applications and code snippets you can reuse, and in-depth coverage of new features in Struts 1.1. If you are looking for a practical book that "shows you how to do it", then Struts Kick Start is for you. Plus, it's the first Struts book with detailed examples of the major Struts tags.

The book begins with a discussion of Struts and its Model-View-Controller (MVC) architecture. The authors' then demonstrate Struts' power through the development of a non-trivial sample application - covering all the Struts components in a "how to use them" approach. You'll also see the Struts Tag Library in action - use tags for HTML, javabeans, logical operations and more. You'll learn to use Struts with JBoss for EJB's, with Apache Axis to publish and use Web Services, and with JUnit for testing and debugging. The authors work with the latest Struts 1.1 features including DynaForms, Tiles and the Validator.

The book includes a CD-ROM containing the tools discussed in the book: Struts 1.1 beta 2, Java 2 Standard Edition, JBoss 3.0.3, MySQL 3.23, XDoclet, Torque, Tomcat, Ant, Axis, Cactus, and JUnit. Plus, it comes with an electronic, fully searchable version of the book.

From the Inside Cover: Thoroughly covers the essential features of Struts in a clear and readable style.

Struts Kick Start is a solid starting point for learning how to develop web applications using Struts. The authors start you off by reviewing the foundational technologies on which Struts is based, and immediately get into the sorts of practical "how to" information and examples that get you up to speed quickly.

Notable features that I really appreciated include the coverage on integration with other technologies (such as EJBs and web services), using Ant to set up your development environment, and the fact that the software goodies you need are available on the included CD. Struts does not live in a vacuum -- it is one of the tools in the developer's toolkit, so knowing how it works with other technologies is very useful.

Of particular importance is the coverage on testing your web application as you build and maintain it. Developing a solid testing methodology, and a substantial suite of tests (to protect yourself against regressions), is critically important to a rapid development cycle that still needs to produce high quality applications. Coverage of testing, though, tends to be minimal in many books about programming technologies. James and Kevin provide specific advice on how to use the JUnit and Cactus testing frameworks with your Struts based applications.

Struts Kick Start is a good resource for learning about Struts, and it will help you get up to speed quickly.

- Craig McClanahan, Creator of Struts

Customer Reviews

9 of 10 people found the following review helpful
1.0 out of 5 stars Looks hopeful, but really isn't, May 8, 2003
This review is from: Struts Kick Start (Paperback)
I bought this book to learn Struts: not to learn ABOUT struts. The authors clearly have a firm grasp on the topic, but unfortunately, this book is more of a 481 page example of them showing the reader what they know than it is instructing the reader in how to learn what they know. I have had this book for several weeks, and have read through many of the chapters before finally coming to the conclusion that this book is really quite worthless.

For example, one of the main selling points for me was that Torque was covered - and even included on the CD. But when I got to Chapter 6, where Torque is discussed (all three paragraphs of it), it's such a "high-level" overview, that I'm no better off than when I started. Here's a quote from the book: "After you've set up the XML file [the code preceeds this quote] and a property file [no code, no explination - what property file?] that tells Torque which database and connection pooling scheme to use, you use Ant [how?] to... Read more

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


8 of 9 people found the following review helpful
2.0 out of 5 stars Guessing with struts, February 15, 2003
By A Customer
This review is from: Struts Kick Start (Paperback)
I'm totally surprised at the good reviews this book has been given. I purchased it based on those reviews and now ... well. The book is wordy and lacks some basic get you started information you would expect from a book with a title containing the words "kick start." The authors got it part right - it should read, "Start kicking." The authors seem to be upholding a long-standing java tradition: make it complex and avoid fundamental procedural steps. For what its worth, when I'm learning something new - upfront - I need to take baby steps - confidence builds and learning is accelerated on and up. Chapter 3 dives directly into a "hello world" application without one single word in the entire book devoted to "Here is what you need to follow along boys and girls..." Not one line of "before we begin, do this and do that." So if your looking for a good text on "guessing with struts" look no more. I give it two stars because there must be some value somewhere in these pages.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


10 of 12 people found the following review helpful
5.0 out of 5 stars A great resource - my favorite book on Struts, February 11, 2003
By 
Donald MacLaren (Portsmouth, NH United States) - See all my reviews
(REAL NAME)   
This review is from: Struts Kick Start (Paperback)
I disagree with the other reviewers that are complaining about the example applications or lack of advanced features. I think books that have examples that are too complex or advanced get away from helping you learn the basics because the examples are too complicated to read quikcly when you are in a hurry. With Struts Kick Start, I can go right to the place in the book that explains the specific thing I'm looking for quickly.

I've looked at all the available books on Struts and I own three of them. Struts Kick Start is the one I have found the most useful in helping me learn because it provides the best coverage of the basics of Struts and has many more coding samples for the struts tags than any of the others. The others refer you to the site for struts tags or just seem to replicate what is already on-line. Struts Kick Start explains each one in detail and gives sample code that you can cut and paste to use on your own. It also provides some great examples of unit... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


Share your thoughts with other customers:
 See all 34 customer reviews...

Online Sample Chapters

Hello World

Struts Kick Start: Building Applications

Table of Contents



Introduction.

Who Should Read This Book? What Do You Need to Bring to the Table? What Does This Book Cover? Tools Youll Need. How This Book Is Organized. The Companion Web Site. Conventions Used in This Book. Updates and Corrections.



1. Struts in Context.

The Parable of the Carpenter. What Is Struts? State of Struts: Where Things Are Right Now. Faces Behind the Code: Struts Development. Where Struts Is Going. Conclusions.



2. The Model-View-Controller Design Pattern: 'Model 2' JSP Development.

The Model-View-Controller Design Pattern. The Origins of Model 1 / Model 2. How Struts Implements the Model 2 Pattern. Conclusions.



3. Hello World!: A First Struts Application.

Hello World! Application Requirements. Applying the Model-View-Controller Pattern. The View Component: The HTML Form and the Form Bean. MessageResources and Application.properties Files. The Struts Form Bean: HelloForm.java. Data Validation and ActionErrors. The Controller Component: HelloAction.java. The Model Component (HelloModel.java). Passing Data to the View Using Attributes: Constants.java. Tying It All Together: The struts-config.xml File. Conclusions.



4. HTTP Protocol: Web Application Communications and Control.

HTTP Protocol and the Request/Response Cycle. Control Information: HTTP Headers and HTTP Response Codes. HTTP Cookies and Session/User Management. Conclusions.



5. JSP, Taglibs, and JSTL: Extending Java onto the Page.

Servlets and JSP. Object Scoping with JSP. Hiding Business Logic Using Beans. JSP Custom Tags. Web Application Deployment. JSTL: The Standard Tag Library. JSP and J2EE: The Big Picture. J2EE and Struts. Conclusions.



6. The Sample Application: A Financial Portfolio.

Requirements: Covering Your Rear End. Starting with the Wireframes. Developing Use Cases. Data Sources and Storage. Choosing Technologies. Conclusions.



7. View Components: What the End User Sees.

The ActionForm. JSP Files: The Alpha and the Omega. The Perils of Automatic Type Conversion. The html:errors Tag. Internationalization. Conclusions.



8. The Controller: Directing the Action.

The Action Class. Accessing the Session and Other Form Beans. User Validation and Struts. Transferring Control Inside and Outside the Application. Conclusions.



9. Model Components: Modeling the Business.

Well-Designed Models. Further Isolation Techniques. Conclusions.



10. The struts-config.xml File: Tying All the Pieces Together.

The struts-config DTD. The Configuration File in Context. Conclusions.



11. How the Struts Tag Libraries Work: The View from Inside.

Review of JSP Tag Libraries. Understanding How Struts Tags Work: The <bean:page> Tag. Comparison to the Java Standard Tag Library. Conclusions.



12. Struts HTML Tags: Page Construction and Form Processing.

Struts Tags, JSP Custom Tags, and Java Scriptlets: Whats the Right Balance? Using Struts HTML Tags to Render Basic HTML Elements. The Basics of Form Processing. Check Boxes and Radio Buttons. Drop Downs and Select/Option Lists. Input Validation and <html:errors>. Uploading a File Using <html:file>. Conclusions.



13. Struts Bean Tags: Storing and Passing Data.

Using Struts Bean Tags That Access Aspects of the Servlet Context. Using Struts Bean Tags That Access Java Resources. Using Struts Bean Tags That Access Bean Properties. Conclusions.



14. Struts Logic Tags: Conditional Presentation Logic.

Using Struts Logic Tags That Perform Conditional Display Based on a Value. Using Struts Logic Tags That Match Substrings. Using the Struts Logic Tags for Iteration. Using the Struts Logic Tags to Test for Absence or Presence of Values. Using the Struts Logic Tags to Transfer Control. Conclusions.



15. The Nested and Template Struts Tag Libraries: Handling Subproperties and Inserting Content.

Using the Struts Nested Tags. Using the Struts Template Tags. Conclusions.



16. The Struts Tiles Tag Library: Creation Master Document Templates.

A Tiles Overview. Enabling Tiles. The Definitions Configuration File. Writing JSP Files for Tiles. Modifying Your Actions. Putting It All Together. Other Aspects of Tiles. Conclusions.



17. DynaForms and the Validator.

DynaForms: Forms Without Java. The Validator: Automating Field Checking. Conclusions.



18. Using Struts with Enterprise JavaBeans.

EJBs Fit with Model Components. Quick Review of EJB Technologies. Using Different EJB Types with Struts. A Struts/EJB Sample Application. Conclusions.



19. Using Struts with Web Services.

Web Services Fit with Struts Model Components. A Quick Review of Web Service Technologies. How to Use Struts with a Web Service. A Struts/Web Service Sample Application. Conclusions.



20. Building, Deploying, and Testing Struts Applications.

An Integrated and Incremental Build/Test Cycle: Its Extreme! Building and Deploying Struts Applications Using Jakarta Ant. Developing a build.xml File for Building Struts Applications Using Ant. Extreme Struts Development with Integrated and Ongoing Testing. Mock Object Testing Using JUnit, StrutsTestCase, and Ant. In-Container Testing Using Cactus, JUnit, StrutsTestCase, and Ant. Conclusions.



Appendix A. Installing Struts and the Sample Applications from the CD.

Listing of Applications Included on the Companion CD-ROM. Step 1: Install the JDK and Tomcat. Step 2: Install MySQL. Copy the WAR Files to the Tomcat webapps Directory. Restart Tomcat.



Index.

 

Book

This product currently is not for sale.

Buy

eBook (Adobe DRM)  $27.99  $22.39

About Adobe DRM eBooks

Information This eBook requires the free Adobe® Digital Editions software.

Before downloading this DRM-encrypted PDF, be sure to:


  • Install the free Adobe Digital Editions software on your machine. Adobe Digital Editions only works on Macintosh and Windows, and requires the Adobe Flash Player. Please see the official system requirements.
  • Authorize your copy of Adobe Digital Editions using your Adobe ID. If you don't already have an Adobe ID, you can create one here.
Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.