Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 struts2 namespace?

924


How struts2 supports internationalization?

1122


How does struts2 token work?

985


What is struts and why it is used?

965


What configuration files are used in struts?

965


What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?

1185


What is controller in struts2?

1146


What is struts in java with example?

953


What are the benefits of Struts framework?

1002


Which library is provided by struts for form elements like check boxes, text boxes etc?

929


When should be opt for struts framework?

1049


How can we display all validation errors to user on jsp page?

1087


What does the term struts mean?

990


What are action classes in struts?

968


What is difference between struts1 and struts2?

922