tell me struts flow ?

Answer Posted / venu

When a client makes a request ,The request goes to the
action servlet as we configured in web.xml (for every
request
*.do----->org.apache.struts.action.ActionServlet.).then
action servlet will read struts-config.xml file and it wil
create module config object and then give it(Module config
obkect) to RequestDispatcher(by calling process() method in
request dispatcher .I mean deligating the request to RD by
doing this.Process method is designed as Chain of
responsability design pattern).After deligating the request
to RD by AS ,AS will not do any thing .from here onwards
Request Dispatcher wil take careof every thing like process
the reuest and send the response.RequestDispacher wil check
whether formbean object existed for this form ,if it is
existed it wil reset the form bean by calling reset()
method of form bean.reset() will reset the new values in the
formbean object.I mean in the form bean object is initiating
with the null values when it is created(it creates when
client makes a request itself).then RD wil check whether the
validate attribute is true or not .if it is true then it
does the validation by calling the method validate().This
method wil return
ActionErrors object.After executing the validate method RD
wil check whether the ActionError object is null or not.If
it is not null,then it wil forward the request to Error.jsp
as we configured in struts-config.if it is null, then it wil
cal the its respective action class as we configured in
struct-config.xml and then action class wil cal bussiness
class method .bussiness class method wil cal the DataAccess
layer class method .The response send it to bussiness class
method.bussinesss class method wil send the response to
action class.action class method wil return the response to
RD.then RD send the response to Success.jsp.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who makes the struts?

551


What is discontinuous strut?

498


Explain the difference between dispatchaction and lookupdispatchaction in struts?

2118


What do you mean by inner class and anonymous class?

599


Is struts efficient?

498






What are action errors and error?

580


What is the default suffix for struts2 action uri ?

552


What is struts-default package and what are it’s benefits?

583


What are disadvantages of Struts?

558


What is the purpose of @emailvalidator annotation?

499


What is the use of web xml in struts2?

527


Difference between struts and spring? Or why use spring, if you are already using struts?

536


What types of validations are available in xml based validation in struts2?

556


Describe the basic steps used to create a tiles application?

557


What are the steps used to setup dispatch action?

501