Architecture

Note: This section describes the architecture of the toolkit Struts Extensions. It help you understand the rationale of the Struts Extensions.

The toolkit Struts Extensions component is an extension to the Apache Struts Framework, so that it shares the Module-View-Controller (MVC) design model. The toolkit Struts Extensions component consists of the BTT Controller, BTT Base Action, BTT Complex Action, and BTT Base Form Bean.

BTT Controller
BTT Controller receives requests from and sends responses to HTML clients. It is the entry point for the requests to the application presentation layer. The BTT Controller consists of two parts:
  • BTTActionServlet, which extends the Struts ActionServlet, providing toolkit specific functionality, input data validation, and so on.
  • BTTRequestProcessor, which delegates the request processing to the BTTRequestProcessor, which in turn provides automatic mapping from HTTP request to contexts.
BTT Base Action
BTT Base Action is a simple action that contains only one task. It has access to the CHA contexts, toolkit extended Struts configuration, and application flow processor. Furthermore, the BTT Base Action provides a default behavior that detects whether a set of conditions is externally defined in the struts-config.xml file, processes those conditions, and then returns the right URI for the next action to perform in the form of ActionForward. Additionally, the BTT Base Action provides session creation and management through delegating these tasks to the Session Manager.
BTT Complex Action
BTT Complex Action is a complicated action that contains a group of similar tasks. It is a toolkit extension based on the DispatchAction of the Apache Struts Framework. BTT Complex Action have all the functions that the BTT Base Actions have.
BTT Base Form Bean
BTT Base Form Bean provides an interface communicating with the CHA server, thus enabling the BTT Base Action and BTT Complex Action access to CHA contexts.
BTT Screen Flow Context:
In native struts configuration, user can define many modules as separated struts configuration file. But in BTT Struts Extension, each "module" file will be considered as one "screen flow". All actions and jsp files defined in same module configuration file will share same screen flow context. This context will start to be created when the first request of this module comes in and it continues to be created until it is removed when any action or jsp files defined in "Final Nodes" section is executed. Only context name is necessary. And each module configuration file has only one screen flow context definition reference .
BTT Final Nodes:
User should define actions or jsp files in Final Nodes Section in struts configuration file, which indicate these actions or jsp files are the final nodes. After accessing this final entities, the screen flow context will be cleaned and pruned.