O'Reilly logo

Servlet, JSP and Spring MVC: A Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16

Model 2 and the MVC Pattern

There are two models in Java web application design, conveniently called Model 1 and Model 2. Model 1 is page-centric and suitable for very small applications only. Model 2 is based on the Model-View-Controller (MVC) design pattern and the recommended architecture for all but the simplest Java web applications.

This chapter discusses Model 2 and provides three Model 2 sample applications. The first application features a basic Model 2 application with a servlet as the controller. The second one introduces the use of controller classes. The third one introduces a validator component for validating user input.

Model 1 Overview

When you first learn JSP, your very first applications would normally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required