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 is the use of reset method of ActionForm class?

565


Can you give an overview of how a struts application flows?

521


What is the procedure of operation of a form tag?

548


What are the classes used in struts?

617


What is the use of interceptor?

514






How can forward action be used to restrict a strut application to mvc?

511


What are the benefits of the struts system?

565


What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?

574


What are the important methods of actionform?

578


Explain about the future of struts?

528


What is ognl?

589


What is the purpose of @doublerangefieldvalidator annotation?

544


Give an example where struts tiles may be used?

542


What is http redirect?

559


Explain about the library tag?

590