The new features in Version 1.1 of the Struts framework are covered in detail throughout this book. Descriptions of the most important ones are provided here.
Prior to 1.1, exception handling was completely left up to the application. There was no support for it in the core framework, and developers were left to their own devices to figure out how to handle exceptions within an application.
Starting with 1.1, exception handling is now part of the core framework. You can declaratively configure which exceptions that actions can throw and what should happen when they occur. Chapter 10 covers exception handling.
A new type of ActionForm class was added in 1.1, and broader support for it has been added throughout the entire framework. The DynaActionForm and its subclasses allow you to configure form-bean instances in the Struts configuration file. This has the effect of saving development time because you are no longer required to create ActionForm classes.
|
See Chapter 7 for more information on this new feature.
The PlugIn feature was added to the Struts framework to provide a mechanism to notify and initialize services when the Struts application starts up and shuts down. There is a wide range of possibilities for this feature, and in fact, the Struts Validator and the Tiles library both take advantage the PlugIn mechanism. See Chapter 9 for more information on using plug-ins in your applications.
The addition of application modules to the framework allows a single Struts application to support more than one Struts configuration file. This facilitates a project being divided into subprojects, each with its own configuration file. While this might sound more complicated, it allows better support for parallel development.
The support for multiple application modules is still undergoing some changes and modifications. At the time of this writing, you can use extension mapping only for the controller servlet, and it may be a while before the rest of the components have full support for this new feature.
Nested tags are a set of JSP custom tags that were added to the Struts framework to give developers better control over accessing properties from a JavaBeans object graph. Many JavaBeans objects contain nested JavaBeans objects that can be referenced by the parent bean. For example, a Customer object may hold a reference to an Address object. To better support the nested nature of these JavaBeans in the Struts views, the nested tags were created. The tags within the Nested tag library are discussed in Chapter 7.