Struts

Types Model-View-Controller ('MVC') Design Pattern in Struts2.0 Framework
adplus-dvertising
Previous Home Next

Introduction:

MVC play biggest role in struts2 framework because MVC separates design concerns (data persistence and behavior, presentation, and control), centralizing control, decreasing code duplication, and making the application more easily modifiable.

Class/Library File Descriptions:-

There are two types of MVC design pattern

  • MVC-1 Design Pattern: MVC -1 have more than one controllers .Each request may have own controller in case of MVC-1.We can create controller using JSP or Servlet.
  • MVC-2 Design Pattern: MVC-2 has only one controller .The servlet is used to create controller for MVC-2.All request must be handled by single controller and only this controller can decide the response GUI on the basis of model calculation and manipulations.
Previous Home Next