How to explain struts work flow

Answer Posted / shiva

1. A request comes in with a .do extension, the container maps it to
the ActionServlet.
2. The ActionServlet acts like a front end controller and dispatches
control to a RequestProcessor.
3. The RequestProcessor finds an action tag with a path attribute that
matches the incoming request
4. Then the RequestProcessor looks for a form-bean tag that has a name
attribute that matched the action tags name attribute.
5. RequestProcessor instantiates a FormBean of the of based on the type
attribute
6. RequestProcessor calls populates the FormBeans fields from the
incoming request, then calls its reset method, then its validate method
7. RequestProcessor instantiates an Action based on the action tags
type attribute
8. RequestProcessor calls the action's execute method which returns
an ActionForward.
9. The RequestProcessor finds a matching ActionForward first within the
nested forward tags, then from within the global-forwards tag.
Note: if the validate method returns an ActionMessage then the
RequestProcessor forward the request to the resource specified in the
action's input attribute

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the components of struts framework?

592


What is the purpose of form-beans tag in struct-config.xml?

555


How many instances of servlet usually run in a struts application ?

545


What are the steps involved in creating a strut application?

515


In struts.xml, what does the attribute "method" stands for in the "action" tag?

536






What is struts actionmapping?

529


What is the purpose of @emailvalidator annotation?

499


What is lookupdispatchaction?

555


What is the purpose of @conversionerrorfieldvalidator annotation?

626


Which interceptor is responsible for mapping request parameters to action class Java Bean properties?

564


What is the purpose of redirect result type?

576


What is apache struts vulnerability?

549


What is actioninvocation?

544


What is package name in struts xml?

564


What is the significance of logic tags in Struts?

584