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

What is the use of execAndWait interceptor?

559


What are the advantages of spring mvc over struts mvc?

497


What configurations are stored in struts configuration file ?

534


Why are frameworks used?

534


Is struts 1 still supported?

512






What is validate() and reset() functions?

568


What is the purpose of '@keyproperty'?

573


Can we have multiple struts config files in a single web app?

501


What do you know about validation plugin ?

514


What does it cost to replace struts?

504


What is the difference between validation.xml and validator-rules.xml files in struts validation framework?

621


Difference between struts and spring?

583


Give an alternative way to protect jsp’s with not much features from direct access.

554


Which class of struts is responsible to converts data types from string and vice versa?

663


What is the different actions available in struts?

544