- A framework is software designed by the experienced developers using very good architecture/design pattern.
- The framework provides a procedure for implementing various features of our application and the framework’s contains the code that is commonly/routinely required in almost all the project.
- Struts, spring web, web works etc. frameworks are designed based on MVC architecture.
As part of struts, we get the following things.
- A servlet class with the name org.apache.struts.action.ActionServlet.
- A set of tag libraries.
- A set of classes that are used by the developers in the development of their own classes.
When a struts based application is started, the following steps will be carried out.
- WC reads web.xml.
- WC creates a servlet object using org.apache.struts.action.ActionServlet class.
- WC calls the init () method on ActionServlet object.
- The struts code that is part of init () method of ActionServlet reads the information available in struts-config.xml.
- Whenever a client sends a request using the URL’s that ends with .do, WC executes the struts code that is part of ActionServlet.
- org.apache.struts.action.Action is not a servlet class
- org.apache.struts.action.ActionServlet is a servlet class.