explain the Struts flow?

Answer Posted / me

struts1.3 flow
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 ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between struts1 and struts2?

510


Explain about tiles?

567


Which model components are supported by Struts?

561


Can explain about the validations and in your project where did u used the validations?

6381


What are the steps involved in creating a strut application?

505






What is the purpose of @intrangefieldvalidator annotation?

843


Briefly tell the two kinds of form beans.

551


How does one create an action in struts 2?

517


Does Struts2 action and interceptors are thread safe?

596


Why do we need mapdispatchtoprops?

467


how to get the last 10 elements using logic:iterate in struts with hiernate from database.

4029


What is jakarta struts framework?

551


What are pull and push mvc architecture and which architecture does struts2 follow?

499


Explain how to work with error tags?

581


What are the steps required for setting up validator framework in struts?

550