Q. What is a framework?
A framework is made up of the set of classes which allow us to use a library in a best possible way for a specific requirement.Q. What are the components of Struts?
Struts components can be categorize into Model, View and Controller:Model: Components like business logic /business processes and data are the part of model.
View: HTML, JSP are the view components. Controller: Action Servlet of Struts is part of Controller components which works as front controller to handle all the requests.
Q. 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.Q. Role of ActionServlet?
1)Process user requests2)Determine what the user is trying to achieve according to the request
3)Pull data from the model (if necessary) to be given to the appropriate view,
4)Select the proper view to respond to the user
5)Validate and populate the form beans
6)Is responsible for initialization and clean-up of resources
Q. What is the ActionForm/ form bean?
ActionForm is javabean which represents the form inputs containing the request parameters from the View referencing the Action bean. Q. What are difference between form beans and Java bean?
form bean extends ActionForm class and has validate(mapping, request) and reset() methods that are executed by controller.
No comments:
Post a Comment