Struts

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.

What are the core classes of the Struts Framework?

Struts is a set of cooperating classes, servlets, and JSP tags that make up a reusable MVC 2 design.

  • JavaBeans components for managing application state and behavior.
  • Event-driven development (via listeners as in traditional GUI development).

Pages that represent MVC-style views; pages reference view roots via the JSF component tree.

What is MVC?

Model-View-Controller (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data.

  • Model : The model contains the core of the application’s functionality. The model encapsulates the state of the application. Sometimes the only functionality it contains is state. It knows nothing about the view or controller.
  • View: The view provides the presentation of the model. It is the look of the application. The view can access the model getters, but it has no knowledge of the setters. In addition, it knows nothing about the controller. The view should be notified when changes to the model occur.

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.

What is the difference between Bean Factory and Application Context ?

On the surface, an application context is same as a bean factory. But application context offers much more.. • Application contexts provide a means for resolving text messages, including support for i18n of those messages. • Application contexts provide a generic way to load file resources, such as images. • Application contexts can publish events to beans that are registered as listeners. • Certain operations on the container or beans in the container, which have to be handled in a programmatic fashion with a bean factory, can be handled declaratively in an application context. • ResourceLoader support: Spring’s Resource interface More >