A.6 New Features of Struts 1.1

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.

A.6.1 Declarative Exception Handling

Prior to 1.1, exception handling was 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 actions can throw and what should happen when they occur. Chapter 10 covers exception handling in detail and includes details about this declarative methodology.

A.6.2 Dynamic ActionForms

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 saves development time because you are no longer required to create ActionForm classes.

It's a little too general to say that you'll never need to create another ActionForm class however, the number of them that you need to create should be drastically reduced.

See Chapter 7 for more information on this new feature.

A.6.3 Plug-ins

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.

A.6.4 Multiple Application Modules

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.

A.6.5 Nested Tags

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.

Programming Jakarta Struts
Programming Jakarta Struts, 2nd Edition
ISBN: 0596006519
EAN: 2147483647
Year: 2003
Pages: 180

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net