What is Struts Frame Work Architecture(With Diagram)

Showing Answers 1 - 5 of 5 Answers

Nath

  • Sep 25th, 2006
 

Hi friend,You plz see this following linkhttp://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.htmlI too learnt from there itselfbyecontact me at:kynathk@yahoo.co.in

  Was this answer useful?  Yes

Nath

  • Sep 25th, 2006
 

Hello friend,Plz see this following linkhttp://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.htmli too learnt from this itselfbyecontact me at kynathk@yahoo.co.in

  Was this answer useful?  Yes

rutujaD

  • Jul 18th, 2010
 

Struts represents an implementation of MVC type 2 architecture. The most important components of Struts are the ActionServlet, Action, and ActionForm subclasses. ActionServlet represents the controller that intercepts the requests and forwards them for further processing based on the configuration file for the ActionForm and Action subclasses. ActionForm transfers data users entered to Action, which performs necessary operations using the Business Tier components of the application and finally forwards to a view.

The controller (ActionServlet) uses a configuration file (typically struts-config.xml) to load definitions of the Action subclasses that will be used to handle the requests. Based on the request URL, the controller finds an action definition that is going to handle the request. The Struts framework processes the request, checks the configuration files, and performs the following actions:

1. If the action requires a form bean, the controller creates an appropriate instance of it. The form bean is used to collect data from the user; it usually exposes properties for the data to be collected. It can also validate the data by overriding the validate() method.

2. The action instance is created and its execute() method is called. The primary purpose of the action bean is to perform any logic necessary to process the request. Once the action bean finishes processing the request, it returns an ActionForward instance to indicate to the controller the action that needs to be performed next. The ActionForward instance can represent a forward to another action or a view that displays the model represented by the form bean and any attributes set in the request and session scopes.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions