Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

explain the Struts flow?

Answers were Sorted based on User's Feedback

explain the Struts flow?..

Answer / farheen

1.When the user performs an action on the Web application,
the Web browser sends a request for some resource to the
Web server.

2.The request is received by the servlet filter dispatcher,
which looks at the request and determines the appropriate
Action to be invoked to serve it.

3.The set of interceptors configured for applying some
common functionality to the request -- validation,
workflow, or file upload, for instance -- are automatically
applied to the request before the Action is executed.

4.A new instance of the Action class is created and then
the action method is executed for storing or retrieving
information to or from a database.

5.The output -- be it HTML, images, PDF, or in some other
format -- is rendered by the result.

6.Then the request traverses through the interceptors in
the reverse order. The returning request allows for the
performance of additional processing or clean-up

7.Finally, the container sends the output to the browser

Is This Answer Correct ?    14 Yes 3 No

explain the Struts flow?..

Answer / sitaram

suppose one jsp page having two text fields and one button.
when ever submit the form. the request goes to action
servlet & then loads the struts-config.xml after check the
request where exactly match the action class in the sc.xml.
then executes the action class & executes validate form bean
then execute method and redirects view form.

Is This Answer Correct ?    10 Yes 1 No

explain the Struts flow?..

Answer / me

struts1.3 flow
1) A request comes in from a Java Server Page into the
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
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
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

explain the Struts flow?..

Answer / santosh kumar

->when ur submit the form page ,ActionServlet will take the
request and check is there any action mapping with specified
saction url , if it there AS pics the name of the form
create the object for FormBean class and call its
getter,reset ,validate methods
->After validate() AS picks the action mapping type value
and create the action class and calls the execute() of
action class
->if execute return null value, AS will terminate the execution
->else AS takes the return value and send the request to
return value

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Struts Interview Questions

multiple instances for action class is it possible

8 Answers   iFlex, ProSoft,

What is the difference between a Strut and a Class?

1 Answers  

diffrence between dispatch action and lookupdispatch action write simple web appliction (insert records in database)

8 Answers   Athena Health Care, Symphony, TCS,

What is the procedure of operation of a form tag?

0 Answers  

Which interceptor is responsible for mapping request parameters to action class Java Bean properties?

0 Answers  

while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert

0 Answers   Banking,

What are the different kinds of actions in struts?

0 Answers  

What is struts and springs in java?

0 Answers  

What is the purpose of @before annotation?

0 Answers  

What is the differnce between 2-tier architecture and 3- tier architecture in java?

3 Answers  

What helpers in the form of jsp pages are provided in struts framework?

0 Answers  

What is the purpose of @doublerangefieldvalidator?

0 Answers