How to explain struts work flow

Answer Posted / aleem

when client makes the request,the request goes to web.xml
files <url-pattern> tag from here it goes to <servlet> tags
<servlet-class> there ActionServlet is loaded into the jvm,
and it is instantiated,initialized with in its init method,
Now the responsibility of actionServlet is to identify the
request processor,by using <inti-param> tag,after request
processor identified ,ActionServlet creates the instance of
the request processor,on that instance of request processor
calls the process(), as a result request reaches to the
requestprocessor.
the next responsibility of requestprocessor is to identify
the Action,using the client requestd uri.if client requested
uri and struts-config's path attributes are same then it
checks for the name attribute,if name attribute is found the
it goes to the <form-bean>tag there it check,if found ,sees
whether the form bean instance is available in the request
scope or not ,if found it instance set the request parameter
values by calling setxxx methods.then request reaches to the
Action. action returns the ActionForward object, using which
<forward> tag forwards to the appropriate jsp.

Is This Answer Correct ?    43 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain struts.devmode?

569


What is the purpose of @beforeresult?

607


For a single Struts application, can we have multiple struts-config.xml files?

585


Explain about logic match tag?

573


Name some of the features of struts2?

573






What do you mean by actionmapping?

536


What is the differences between struts1 and struts2?

532


What is the default suffix for Struts2 action URI and how can we change it?

525


What is difference between spring and struts?

506


What are the cons of struts 2?

575


Is struts action class singleton?

553


What do you mean by inner class and anonymous class?

597


What is strut web xml?

535


What is lookupdispatchaction?

555


How struts 2 validation works?

582