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

Why does the tag url-encode javascript and mailto links?

822


What value does read() return when it has reached the end of a file?

793


Are enterprise beans allowed to use thread.sleep()?

918


What is Stream Tokenizer?

1990


which book is better for jdbc ,servlets and jsp

1873


Difference between loadclass and class.forname?

832


What is clustering? What are the different algorithms used for clustering?

835


How are commas used in the intialization and iteration parts of a for statement?

870


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

848


What is bean? Where can it be used?

834


What is a policy?

2061


Why a client should be multithreading? Explain.

847


What are callback interfaces?

850


Can I run seam with jdk 1.4 and earlier?

771


Can I import same package/class twice? Will the jvm load the package twice at runtime?

882