Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to explain struts work flow

Answer Posted / pradeep kumar simhadri

1) When a user submitted a jsp page. that page having
(attribute of )action="login.do". the container will call
to WEB.XML. in that web.xml thert is two section servlet
And servlet mapping


2) In servlet mapping it find *.do in the url-pattern. if
it found to take the name of servlet. and check the
corresponding class. in the servlet section. that class is
ActionServlet.
3) ActionServlet is the controller of Struts module
architecture. in Action servlet having the service method.
in that method we create RequestPrecessor class instance
4) Service(req,res)
RequestPrecessor rp = new RequestPrecessor();
5) We call a process method of RequestProcessor class
through the instance rp.process(req,res)
6) In the request processor class have the process method
with the parameter of req,res. then it has 1 if condition
in this class. that condition return always true. because
that is dummy method.
7)Inside that condition ther is 6 steps are processing
a)Create a action mapping instance in the "Struts-
Config.xml". it will kept all details of the action mapping
path, value, type forward, validation=true/false, input
="*.jsp" etc these r created instance
b)Then it will create Form class instance before it check
the name of action mapping and form name are coincidence or
not if it same it will create form instance
c)Then it will go to ActionMapping instace the ris mention
or not the validate =true/fale if false it will not execute
the this step else it will execute this step.
d) Then it will create action instance
e) Next it will take four parameters of execute Method it
will return ActionErrors instance. if it is not empty. it
will go to error page other wise it will got to
corresponding page. else if it is empty if will go further
and display corresponding value of page in jsp view.This is
struts flow.

Is This Answer Correct ?    80 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I have html form property without associated getter and setter formbean methods?

953


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

889


Explain architecture of struts2?

1041


How to explain Software Bank Loan descriptions

2403


What is struts actionmapping?

889


What are the contents on web.xml in struts application ?

920


What do you mean by tiles in struts?

982


Explain about tiles?

990


Can we integrate struts with spring?

953


What is interceptor struts2?

931


How is token generated?

971


What is struts in java with example?

906


What is the apache struts vulnerability?

888


How to handle exceptions in structs?

1025


What is struts2 framework?

878