Looking at the Big Picture
Now that we have described the example application that will be the basis of this chapter’s discussion, it’s time to start looking at how we can implement it using the Struts framework. Although Chapter 1 discussed the MVC pattern in the order of model, view, and then controller, it doesn’t necessarily make sense to follow that order as we explore the Struts components. In fact, it’s more logical to cover the components in the order in which the Struts framework uses them to process a request. Thus, we’ll discuss the components that make up the controller portion of the framework first.
The Struts Component Packages
The Struts framework is made up of approximately 300 Java classes, divided into 8 core packages (“approximately” is an appropriate term because the framework is continuously growing and being shaped). In this chapter, we’ll focus on only the top-level packages. Figure 3-4 shows the top-level packages and their dependencies within the framework.
Figure 3-4. The eight top-level packages in the Struts framework
Tip
The validator
package shown in Figure 3-4 does not represent the entire set of classes
and interfaces necessary for the Validator framework. These are only
the Struts-specific extensions necessary to use the Validator
framework with Struts.
The framework components are not arranged by what role they play in the MVC pattern—actually, they ...
Get Programming Jakarta Struts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.