O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

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

Calling Multiple Controllers and Views

One of the things you will notice in the controller servlet is that it has direct knowledge of the JSP that is handling the view. You should strive to break such dependencies whenever you can. For example, if you wanted to do things exactly the same way in the controller but display a different view of the data, you would have to make a separate version of the controller that displays the alternate view.

The controller should be concerned with sending input information to the model, and the view should be concerned with displaying the output. The only thing that ties the controller to the view at the moment is the fact that the controller contains the logic to forward the request on to the view. The way ...

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