JSP model 2 architecture
Appearance
![]() | This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (September 2008) |
In the design of Java Web applications, there are two commonly-used design models, referred to as Model 1 and Model 2.
Model 1 is simpler and only recommended for small applications. Model 2 is recommended for medium- and large-sized applications.
Model 2 uses the Model-View-Controller (MVC) design pattern to separate presentation from content.
In a Model 2 application, requests from the client browser are passed to the controller, which is a servlet. The controller decides which view (JSP) it will pass the request to. The view then invokes methods in a JavaBean (which may access a database) and returns the Response object to the Web container, which is then passed on to the client browser.
See also
- Apache Struts is an open-source framework for implementing web-applications based on a Model 2 architecture.
External links
- Understanding JavaServer Pages Model 2 architecture by Govind Seshadri (JavaWorld)
- Brian's waste of time - a history of MVC, including Model 2.
- ASP.NET Presentation Patterns - In this article Dino Esposito discusses how Model2 is also used in ASP.NET MVC.