SEARCH - book - catalog - tips - links - news - home
Struts in Action
(formerly Java Web Development with Struts)
Struts In Action
Building web applications with the leading Java frameworkAvailable through the publisher's website, Amazon dot Com, and wherever fine computer books are sold.
Struts solves the most common problems of web development. By basing your application on the Struts framework, you can reuse proven solutions and focus on what's unique to your own case. Struts is an open-source product distributed by the Apache Software Foundation.
Struts in Action is a comprehensive introduction to the Struts framework. It covers initial design, data validation, database access, dynamic page assembly, localization, product configuration, and other important areas. It shows you how to use both JSP tags and Velocity templates. It carefully explains the Struts architecture and control flow, as well as how to extend framework classes.
Difference between Struts 1.1 and Struts 1.0 are pointed-out and a case-study illustrates the 1.0 to 1.1 transition. The book shows you dozens of proven design techniques, patterns, and strategies, many of them not found elsewhere.
What's Inside
- Struts 1.1 and 1.0
- Jakarta Validator and Tile packages
- Jakarta Scaffold toolkit
- Velocity templates
- HTTP, Java Servlets, and JSP tags
- Dynamic web programming
- Servlet centric application designs
- Working with databases and data services
- Design and development patterns
- Tons of examples
The lead author, Ted Husted, is a consultant and an acknowledged Struts authority. He is a manager of the jGuru Struts forum and a core member of the Struts development team. The book's Foreword is by Craig R. McClanahan, the architect and lead developer of the Struts framework.
November 2002, Softbound, 630 pages, ISBN 1930110502. Order yours today!
Annotated Table of Contents
Developing Java Web Applications with Struts (450+ pages) Part 1 - Getting started with Struts
Part 1 is Struts distilled. We introduce Java web applications, examine the framework’s
architecture, build two simple applications, and walk though configuring the Struts components -- all in the span of a hundred pages.1 - Developing Web Applications with Struts Chapter 1 introduces web application development in general and Struts in particular. We look at how Struts is written and distributed, the enababling technologies behind web applications, and the overall Struts architechture. To round out the chapter, we jump right in and develop our first Struts application. 2 - Exploring the Struts architecture Chapter 2 introduces the Struts architecture. We overview Struts architecture and application frameworks in general. To help you get the big picture, we take a close look at the how control flows through the framework. The chapter concludes with a frank discussion of Struts' strengths and weaknesses. The chapter is intended to give working developers a firm grounding in what working in Struts is all about. It is also written to help product managers decide whether Struts is a good fit for their team. 3 - Building a simple application Chapter 3 walks through the development of a simple "logon" application. Although a very simple application, it includes the same essentials as any Web application. The goal here is to give a hands-on developer the "big picture" before we focus on the gory details. The general development process is overviewed from a Struts perspective. 4 - Configuring Struts components
Chapter 4 explores the Struts configuration, which lies at the heart of the framework. Configuring the web deployment descriptors and Ant build files is also covers. Part 2 - Raising your framework
Part 2 zooms in on each of the core framework components. Our goal is to brief you on how each component works and show you how the component is used by working developers. In most cases, we present several alternative ways to use the components, since we know that different developers and different applications have their own needs.5 - Creating ActionForms Chapter 5 covers the Struts ActionForm. This key object can be many things to the application, transfer object, firewall, API, data validator, and type transformer. We introduce several techniques to help you get the most out of the double-edged sword Struts calls form beans. 6 - Wiring with ActionForwards Chapter 6 covers the Struts ActionForward. The trickiest part of any Web application can be getting there from here. ActionForwards help you clearly define the entry points to your application, making it easier to see if you've covered all the bases. 7 - Designing with ActionMappings. Chapter 7 covers the Struts ActionMapping. The mappings are the core of the Struts controller. Actions classes can be designed for reuse and configured for different tasks with an ActionMapping.. Here we explore how to use ActionMappings to control the flow through your application, and get the most out of every Action class. 8 - Developing Action classes Chapter 8 covers the Struts Action object. These are the workhorses of a Struts application -- and where the Web developers spend most of their time. We take a close look at the Action classes bundled with Struts, and several goodies from the Scaffold package, along with the thorny problem of populating business classes from the incoming Struts ActionForms. 9 - Extending ActionServlet Chapter 9 covers the Struts ActionServlet. The controller servlet is the framework's "mouthpiece". It calls the shots, but lets other people do the dirty work. Here we look at the news ways to customize the ActionServlet to best suit the needs of your application or a specific application module. Part 3 - Building your pages
Part 3 moves the focus to building the visible portion of your application—the pages. Discussing pages later in the book reflects a key tenet of the Struts/Model-View-Controller architecture: most of the real work is done before a page is ever displayed.10 - Displaying dynamic content
Chapter 10 explores the Struts JSP tags and sever pages generally. From the user's perspective, the web page is the application, and represents everything the application is suppose to do. The key advantage of using Struts is that it helps you separate displaying content from acquiring content. Most Struts applications rely on JSP to create dynamic pages, but the framework can be used with any Java presentation technology. In this chapter, we scrutinize the Struts JSP tags, and briefly introduce using other presentation systems with Struts, like XLST and Velocity. 11 - Developing applications with Tiles Chapter 11 covers the Tiles page-assembly framework. Dynamic templating systems, like Tiles, bring familiar programming patterns to the presentation layer of a web application. A "tile" encapsulates a block of markup, much like a method encapsulates a block of Java code. Building Web pages with Tiles brings consistency and flexibility to the unruly, chaotic world of HTML. 12 -Validating user input Chapter 12 covers the important topic of validating user input. A popular extension to the Struts core is the Struts Validator. This is a very powerful component that provides both client-side and server-sidevalidation from the same configuration. We show how to integrate validation into your Struts application, using both prewritten validators as well as any you write on your own... 13 - Localizing content Chapter 13 covers the Struts i18n features. Struts supports internationalization from the ground up. This chapterexplores how and where i18n is built into Struts, and what you need todo to get it working properly. The underlying theme is what you need todo to develop your application for one language today, but be able to addothers tomorrow. 14 - Accessing data services Chapter 14 explores hooking up data services to Struts. This chapter shows how to use helper classes to connect a Struts Action with different types of enterprise data systems -- including databases, search engines, and content syndication services. Working examples are provided using JDBC, Lucene, and Rich Content Syndication. Part 4 - Struts by example
Part 4 returns to the hands-on lab work we started in part 1. Here, we walk through three case study applications. Together, these examples demonstrate using Struts with data services, implementing applications with Tiles and the Validator, upgrading from Struts 1.0 to 1.1, and using Velocity Templates in your application.15 - Artimus: Pulling out the stops Chapter 15 is our feature application, Artimus. This enterprise grade application pulls out all the stops and demonstrates the key Struts features and add-ons in one tidy, eminently reusable package. Authentication, business beans, customization, data access, JSP tags, localization, Scaffold, Tiles, transactions, Validator, and more: It's an A-Z walkthrough of the best and brightest Struts has to offer. 16 - Redux: Migrating to Struts 1.1 Chapter 16 is our Struts 1.1 upgrade guide. Here we take the Artimus application from chapter 15 and retrofit it for the new 1.1 features, including Plug-Ins and DynaActionForms. If you have a legacy Struts 1.0 application ready for upgrade, this is the chapter for you! 17 - Velocity: Replacing JSPs Chapter 17 shows how you can use Velocity templates with Struts. We revise our logon application (see chapter 3) to use Velocity templates and show you how Velocity and JSP compare, side by side.. Appendices A - Design Patterns Like many frameworks, Struts is implemented around several classic design patterns. Understanding what patterns Struts uses and why, makes it much easier to "program with the grain", so you can create applications that make the best use of the Struts components. B - struts-config API Reference The format used by the Struts configuration file (struts-config.xml) is described by the struts-config Document Type Definition. C - Taglib Quick Reference Summarizes the JSP tags in the Struts taglibs, and itemizes the properties each tag accepts.
About the authors
Ted Husted is an acknowledged Struts authority, an active member of the Struts development team, and manager of the JGuru Struts Forum. As a consultant, Ted has worked with professional Struts development teams throughout the United States. Ted also helps manage the Apache Jakarta project, which hosts the Struts framework. Ted lives in Fairport, New York with his wife, two children, four
computers, and an aging cat.
Cedric Dumoulin is an active member of the Struts development team and the author of the Tiles framework. Cedric is presently a researcher at the University of Lille. He has also worked in the R&D department of a leading international internet banking company. He lives in Lille, France.
George Franciscus is a principal at Nexcel, providing technical and management consulting services in several industries including Telecommunications, Banking, Life Insurance and Property and Casualty Insurance. George has expertise in Java, J2EE, Domino, relational databases, and mainframe technologies. He holds a BSc in Computer Science from the University of Toronto. George lives in
Toronto, Ontario with his wife and three children.
David Winterfeldt is a Struts committer and author of the Commons Validator package. He works as a senior developer at a major company implementing J2EE technology. David currently lives in New York City.Craig McClanahan creator of the Struts framework, contributed the foreword to this book. Craig was the primary architect of Tomcat 4 and the implementation architect of the Java Web Services Developer Pack. He is now Sun's specification lead for JavaServer Faces (JSR-127) as well as the Web Layer Architect for the J2EE platform. Craig, as the primary developer of Struts, perhaps provided the most important part of this book -- a framework for us to write about.
About the in Action series
Manning's in Action books combine overview with how-to examples to encourage learning and remembering. Cognitive science tells us that we remember best through discovery and exploration. At Manning, we think of exploration as "playing". Every time computer scientists build a new application, we believe they play with new concepts and new techniques -- to see if they can make the next program better than the one before. An essential element of an in Action book is that it is example-driven. In Action books encourage the reader to play with new code and explore new ideas. At Manning, we are convinced that permanent learning comes through exploring, playing, and. most importantly, sharing what we have discovered with others. People learn best in action .
There is another, more mundane, reason for the title of this book: our readers are busy. They use books to do a job or solve a problem. They need books that allow them to jump in and jump out easily, books that will help them in action. The books in this series are designed for these "impatient" readers. You can start reading an in Action book at any point, to learn just what you need just when you need it
Now available through the publisher's website. Order yours today!