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 purpose of @validations annotation?

570


What is the design role played by struts?

552


Describe validate() and reset() methods.

606


Which class of struts is responsible to converts data types from string and vice versa?

665


How many servlet controllers are used in a Struts Application?

515






What is difference between struts1 and struts2?

507


Explain the core end goal while using java struts?

526


Which configuration file is used for storing jsp configuration information in struts?

545


What are the important methods of actionform?

587


How can we group related actions in one group in Struts?

564


Which design pattern is implemented by Struts2 interceptors?

552


What do you mean by the abstract package in struts2, and what is its utilization?

513


What is life cycle of an interceptor?

548


What is the difference between Jakarta Struts and Apache Struts? Which one is better to use?

576


What is the difference between filters and interceptors ?

502