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

What is the difference between RMI and Corba?

2269


What must a class do to implement an interface?

588


What is the relationship between local interfaces and container-managed relationships?

598


Can I have an action without a form?

603


What if the static modifier is removed from the signature of the main method?

711






Can I use multiple html form elements with the same name?

585


Which javutil classes and interfaces support event handling?

590


What do you need to set-up a cluster with jboss?

581


Explain the steps in details to load the server object dynamically?

4549


Describe, in general, how java's garbage collector works?

542


Why use a datasource when you can directly specify a connection details?

538


What are the purpose of introspection?

682


Is “abc” a primitive value?

619


Why won’t the jvm terminate when I close all the application windows?

757


What is the difference between long.class and long.type?

571