Chapter 12. Extending Struts 2 with plug-ins

 

This chapter covers

  • Extending the functionality of Struts 2
  • Integrating with SiteMesh, Tiles, and JFreeChart
  • Injecting constants and beans
  • Writing a breadcrumb plug-in

At this point, you’ve looked at all the essential artifacts that make up Struts 2. You’ve seen how all the parts fit together and could go off and write some amazing code. However, you probably wouldn’t get the best return on your investment. This section begins our review of the advanced features that tie all the basics together in exciting and useful ways.

Like any well-designed software, you should be able to extend the functionality without modifying existing code. Struts 2 leverages the plug-in architecture for this very purpose. If you use Firefox or Eclipse, you already know how this works. When you need to use a feature that wasn’t included in the “baseline,” you simply install a plug-in that provides the new capability you seek. A plug-in includes the software ingredients to enable features that weren’t considered in the design of the original code base. Think of them as strategic points in the framework where you can plug in your own features and behaviors. In fact, you can write your own plug-in with relative ease. Perhaps one day you’ll contribute your custom plug-in and it’ll become the most downloaded of them all. In this chapter, we crack open a plug-in and study what’s inside, and also learn how they’re packaged and made ready for deployment.

12.1. Plug-in overview

 
 
 

12.2. Common plug-ins

 

12.3. Internal component system

 
 

12.4. Writing a breadcrumb plug-in

 
 
 
 

12.5. Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest