Popular Posts

Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Thursday 13 October 2016

Struts framework helps to develop web applications that utilize an MVC architecture. It helps separate the display logic from business logic.

Model = business logic (data model)
View = presentation
Controller = navigational code between model and view

The Flow




On receiving a HTTP request from the action servlet, the request processor, another key controller component, performs core request processing as follows:
  1. Uses the module's Struts configuration file to determine the configured action mapping for the request.
  2. Uses the module's Struts configuration file to locate or instantiate an appropriate action form for the request, if necessary, and populates and validates it.
  3. Uses the module's Struts configuration file to locate or instantiate an appropriate action for the request.
  4. Passes the request, action form, and action mapping to the action (step 3 in the preceding diagram).
  5. Forwards the user to the appropriate view element when the action is completed

Lets see the important properties of Action Mappings.

Action mappings represent the information that the controller knows about the mapping of a particular request to an instance of a particular Action class. The request processor selects an appropriate action for each request based on the action mappings ( action-mapping elements) defined in the Struts configuration file.

To know more click here.