O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

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

The MVC Pattern

Until now, you've been using what the programming hotshots call “model 1” designs. In a model 1 site, the JSP provides both the display and the flow control of the site, and it hooks up to the business logic as well.

Model 1 sites have a couple of problems, especially when you start dealing with large, complex applications. For one thing, the JSP starts to get pretty unwieldy because you have to place more flow control into it.

In addition, you end up with a lot of cases in which you begin to process a JSP, realize that you need to move on to the next step, and have to do a redirect in the middle of the file.

You also find yourself with hard-coded URLs throughout your JSP and have a huge task on your hands every time you want ...

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