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 are the core classes of the struts framework?

502


What is the struts in java?

497


What configurations are stored in struts configuration file ?

525


What do struts do?

512


How we can configured action mapping in struts?

571






What is spring hibernate and struts in java?

481


How many servlet controllers are used in a Struts Application?

500


How to upload struts file?

595


Explain about logic match tag?

559


What is the purpose of execute method of action class?

554


Whats the difference between the default namespace and the root namespace?

509


How can you create your custom interceptor in struts 2?

531


Explain about struts dispatch action?

540


What do you mean by action errors and what are the results they force?

564


What are the conditions for actionform to work correctly?

513