The Sample Application

To illustrate some of the most important features of Struts, we provide an application called Library-Struts. Library-Struts allows you to log in as a user (a Borrower or a Librarian) and add books, check out books, and list all of the books. This sample application has the same functionality as the example in the JSF chapter (in fact, the JSF application was developed first, and the Struts version is a port).[62] For a high-level description of the purpose of this application, see Chapter 5. For readers attempting to make a choice between Struts and JSF, a comparison of these chapters and the sample applications may be illuminating.

To run the sample Struts application, you will need Version 1.2.4 of Struts (http://struts.apache.org) and a Servlet 2.3 (or later) compatible container such as JBoss Version 4 (http://www.jboss.org). The downloadable package of examples for this book, available at http://www.oreilly.com/catalog/javaentnut3, includes an Ant script for building the application and deploying it to JBoss.

[62] Perhaps the only known port from JSF to Struts?

Get Java Enterprise in a Nutshell, Third Edition 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.