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 / madhu

1) A request comes in from a Java Server Page into the
ActionServlet.
2) The ActionServlet having already read the
struts-config.xml file, knows which form bean
relates to this JSP, and delegates work to the validate
method of that form bean.
3) The form bean performs the validate method to determine
if all required fields have been entered, and performs
whatever other types of field validations that need to be
performed.
4) If any required field has not been entered, or any field
does not pass validation, the form bean generates
ActionErrors, and after checking all fields returns back to
the ActionServlet.
5) The ActionServlet checks the ActionErrors that were
returned from the form bean’s validate method to determine
if any errors have occurred. If errors have occurred, it
returns to the originating JSP displaying the appropriate
errors.
6) If no errors occurred in the validate method of the form
bean, the ActionServlet passes control to the appropriate
Action class.
7) The Action class performs any necessary business logic,
and then forwards to the next appropriate action (probably
another JSP).

Is This Answer Correct ?    167 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you create message resource?

962


What is the difference between session scope and request scope when saving formbean ?

943


What is the purpose of @urlvalidator annotation?

944


What are the cons of struts 2?

950


What is ValueStack and OGNL?

995


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

1045


What is struts2 namespace?

866


Which class is the Front Controller in Struts2?

928


What are action errors and error?

990


What is the purpose of @createifnull annotation annotation?

987


Describe validate() and reset() methods.

1025


What is pojo in struts2?

948


What is the difference between struts and spring?

888


Explain about tiles?

991


When it’s useful to use IncludeAction?

962