explain the flow of struts?

Answer Posted / kumar s

a)Client makes a Http Request.
b)Every request has to go to the ActionServlet which
actually is the Front Controller of Struts.
c)ActionServlet calls the Request Processor for execution
of the request.
d)Request Processor reads the xml file (Struts-config.xml)
where the mappings have been provided for each and every
request and finds out the corresponding Action Class
mapping to that request.
(1)How the mappings are provided in Struts-Config.xml
file will be discussed under Configuring Recipe Module.
e)Before passing the control to the execute() method of the
Action Class, it instantiates the Form Bean associated with
that Action Class.
f)Once the Action Form/ Form Bean is instantiated, control
goes to execute() method of Action Class.
g)Action Class then call the Business Layers to fetch the
data requested by the client.
h)Once the data is fetched, it is populated in the Form
Bean and control goes back to Action Class.
i)And finally, Action Class throws the control to JSP page
where the data is rendered.
j)To render the data on JSP page, data is taken out of Form
Bean with the help of Struts Tags.
k)Struts provides us with various Tag Libraries which makes
the JSP page easy to create and maintain.
l)JSP Tags will be discussed later.

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Will the general public have access to the infobus apis?

528


Why are some of the class and element names counter-intuitive?

571


What is a clone?

572


What is local interface. How values will be passed?

554


Is the infobus client side only?

607






what is the use of State Factories?

1905


What is the difference between a static and a non-static inner class?

596


What is table mutation and how do you avoid it?

1915


Do you think that java should have had pointers?

596


What is the difference between java class and bean?

578


How to pass parameters in RMI?

1688


For which statements does it make sense to use a label?

585


Is jvm a overhead?

623


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

1736


Which javutil classes and interfaces support event handling?

581