O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

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

Our roadmap for building the app

When we started this chapter we outlined a four-step process for developing our web app. So far we’ve:

1 - reviewed the user views for our web app

2 - looked at the architecture

3 - setup the development and deployment environments for creating and deploying the app

Now it’s time for step 4, creating the app.

We borrow from several popular development methodologies (a little from extreme programming, iterative development), and mangle them for our own evil purposes...

The five steps we’ll follow (in step 4):

4a

Build and test the HTML form that the user will first request.

4b

Build and test version 1 of the controller servlet with the HTML form. This version is invoked via the HTML form and prints the parameter it receives.

4c

Build a test class for the expert / model class, then build and test the expert / model class itself.

4d

Upgrade the servlet to version 2. This version adds the capability of calling the model class to get beer advice.

4e

Build the JSP, upgrade the servlet to version 3 (which adds the capability of dispatching to the JSP), and test the whole app.

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