Submitted by: sravishankarprasad
Struts Frame work
This is what i understud by reading books and also tested successfully.
When a request is made to the Struts application, the first servlet Invoked is ActionServlet, which contains implementation for doGet(),doPost() methods.
Both these methods imvokes process() method which initialises the struts executions. This process method invokes processPreproces() method of RequestProcessor class. This method returns boolean value. If it returns false then request professing will be terminated and error page will be desplayed.
else (in case of true) the request processor object will read the path associated with request Object and reads the struts-config.xml files to find the corresponding action element having same path as in the request.
If it finds the action element then it reads the name of the action element whose value is the name of the form-bean, Then it populates the request object holded values to that FormBean class.
Then if the validate attribute of the action element is set to true then it also invokes the validate method on the FormBean.
If the validation goes fine then it will dispatch the exeuction process to Action class mapped as a value to type attribute of action element.
Once the request is processed i.e after compeletion of execution fo execute() method the response will be received by RequestProsessor class object i.e the ActionFroward class Object .
Based on this object the response page to be displayed will be read from the forward sub element of the action element. and That will be displayed at client side.
This is the internal execution of the complete struts application.
Any comments, suggetions accepted
Above answer was rated as good by the following members:
kumaras365