Summary

In this chapter, you have seen how to separate functionality using the command bean pattern. This design helps you reuse elements so that you can use a model in more than one view and a view as the output for more than one controller.

In this chapter, our command beans executed only JDBC commands. You can wrap any of your business logic within these beans—for instance, performing operations such as sending email and accessing non-database resources as well as Enterprise JavaBeans. To improve efficiency, you can also perform pooling on command beans like you did for database connections.

Most of the operations in this chapter were read-only operations required for browsing the catalog and hence could be executed by any user. Operations ...

Get Java Server Pages from scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.