1) Explain Struts?
Struts is open source software used to develop java based web page.
Struts takes the help of Model View Controller (MVC) architecture. Where Model is referring to business or database, View is referring to the Page Design Code, and Controller is referring to navigational code.
Struts uses Jakarta Packages, Java Servlets, JavaBeans, ResourceBundles, and XML.
2)What is the need of the Struts ?
- Helps in creation and maintenance of the application.
- Make use of Model View Controller (MVC) architecture. Where Model is referring to business or database, View is referring to the Page Design Code, and Controller is referring to navigational code.
- Enables developer to make use of Jakarta Packages(Struts 2.0), Java Servlets, JavaBeans, ResourceBundles, and XML.
3)What is Action class?
An Action class in the struts application is used to handle the request.
It acts as interface or communication medium between the HTTP request coming to it and business logic used to develop the application. Action class consists of RequestProcessor which act as controller.
4)How Exception are Handled in struts 2.0?
- Programmatically handling: In this exception are handled by using try and catch block in program. Using this programmer can define how to handle the situation when exception arises.
- Declarative handling: In this exception handling is done by using the XML file. Programmer defines the exception handling logic in the XML file.
5)What are the classes used in the struts2.0?
- Action Class
- Action Servlet
- Action form
- Action mapping
- Action forward
6)What is MVC?
Mvc- Model view Controller:
• View: View is referring to the Page Design Code. It is responsible for the showing the result of the user’s query. View modifies itself when any changes in the model happen. It is the combination of an model and controller.
• Controller: Controller is referring to navigational code. Controller will chose the best action for each incoming request, generate the instance of that action and execute that action. It will control all the all action class and then pass the action into the view page.
7) what designed pattern are used in struts2.0?
- Dispatcher view
- Fornt controller
- view helper
- Synchroinzed token
8)What is ActionServlet?
ActionServlet is a simple servlet which is the backbone of all Struts applications.
It is the main Controller component that handles client requests and determines which Action will process each received request. It serves as an Action factory – creating specific Action classes based on user’s request.
9)what is the role of the Action servlet?
*Process user Requests.
*Determine what the user are trying to achieve according to the user request.
*It is the responsible for the intalize and clean up the process.
10)what are the different action are available in the strust2.0?
- Forward action
- Include action
- Dispatch action
- Lookup action
- Switch action.
10)What is DispatchAction?
- The DispatchAction enable the programmer to combine together related function or class.
- Using Dispatch Action programmer can combine the user related action into a single UserAction. like add user, delete user and update user.
- DispatchAction execute the action based on the parameter value it receives from the user.
- It is the mechanism for grouping the set of the related function into the single action.
- The DispatchAction enable the programmer to combine together related function or class.
- Using Dispatch Action programmer can combine the user related action into a single UserAction. like add user, delete user and update user.
- DispatchAction execute the action based on the parameter value it receives from the user.
- It is the mechanism for grouping the set of the related function into the single action.
Comments
Post a Comment