Fish & Chips Club

Fish And Chips Club

Fish and Chips Club - WEB4J Example Application.


Packages Reset the user's password. Edit the roles attached to a user. Edit the settings attached to a user. Log off the application, and terminate the session. Allow the user to change their password. Allow user to change their preferences. Serve a binary file instead of text. Explore encoding issues in your enviroment. Upload image files to the server. Exercise new controls defined by HTML5. Exercises the case of multi-valued parameters. Toggle display of help text on and off. Code Tables for the application. Simple message board. Show the Home Page, with possible link to an RSVP screen. Maintain a list of Members in the Fish and Chips Club. Enter ratings for each Restaurant. Various reports of interest. Edit the pick list of Restaurants. Allow Members to enter an RSVP response to the next future Visit. Search screens. Visit to a particular Restaurant on a particular day. Test suite for executing all JUnit tests in the application. Test doubles for mimicking the runtime environment. Base Text for translation. Locales supported by this application. Refresh the translations held in memory. Edit translations. Handle unknown base text. Utility classes used across more than one feature. Useful diagnostic information for solving problems. Display logging configuration, and edit logging levels. Display response time statistics. Ping various sanity pages. Force a failure, to exercise the application's behavior upon failure.
hirondelle.web4j.config Concrete implementation classes required by WEB4J.


Fish and Chips Club - WEB4J Example Application.

This is an example application, authored by John O'Hanley. It demonstrates using WEB4J to build a typical Java web application : a person using a browser to interact with a relational database.

The problem domain is a Fish and Chips Club, where a group of friends meet regularly for lunch at various local restaurants, to have Fish and Chips for lunch.

To run this application, please see the Getting Started Guide.

Version History


Features specific to the Fish and Chips Club include :

Other features are more generic, and may be used as templates or guidelines in development of your own applications:


Note that package-by-feature is used. This is the recommended style, though it is not required. (If you have never used package-by-feature, you are encouraged to try it: those who do try it rarely return to the package-by-layer style.)

The hirondelle.web4j.config package is special, and is reserved by WEB4J for the exclusive use of the application programmer. See BuildImpl in the WEB4J javadoc for more information.

Version History

Version Number Convention

The first three parts of the version number of the Fish and Chips Club is synchronized with the version number of the corresponding web4j.jar version number with which it was built.

For example, - published October 19, 2013

Updated the version of web4j.jar. This is the first version to use JDK 1.6. The fileupload feature now stores the uploaded file (using its InputStream) in the database, and lets you serve the bytes from the database. Before, this feature only saved the bytes to the server's file system. This exercises the new support for InputStream as a building-block type. - published October 5, 2013

Updated the version of web4j.jar. - published June 9, 2012

Updated the version of web4j.jar. - published September 24, 2011

Updated the version of web4j.jar. Minor bug fix. - published September 17, 2011

Updated the version of web4j.jar. Two config items that force creation of threads have been removed from web.xml: The displayMessages.tag has been altered, to simply remove session-scope messages after they have been displayed. - published July 9, 2011

The only change is to the version of web4j.jar. - published May 15, 2011

The only change is to the version of web4j.jar. - published March 1, 2011

Includes an implemention for the new LoginTasks interface. The old Servlet Filter, which used to react to user login, has been removed.

New settings in web.xml, for the improved implementation of EmailerImpl. - published January 29, 2011

Encoding issues have been fixed. - published April 17, 2010

Fixed :

Converted some String objects to Id or SafeText.

The AllowStringAsBuildingBlock setting in web.xml has been switched on. Since this app is an informal reference implementation, it's best to allow this, in order to exercise more code. - published January 29, 2011

Uses a fix in web4j.jar regarding encoding. The CsrfFilter was incorrectly coercing encoding to 8859-1. As well, ensure the app correctly supports UTF-8. Re-save JSP's and tag files as UTF-8, change database script to explicitly state the encoding, define a prelude JSP in web.xml. - published January 30, 2010

This version now uses DateTime, although in a small way. (The Predictions app makes far more use of DateTime.) The ShowDiagnostics class now uses DateTime instead of java.util.Date.

Fixed, which had a NullPointerException in its validateState method.

The Discussion feature's JSP now renders a date using a fixed format, instead of one sensitive to Locale. This fixes a problem seen when the translation of the format may be missing (which happens if the database script fails due to encoding issues.) - published September 7, 2009

FakeServletContext has added getContextPath (which is likely to be added in the Servlet 3.0 Specification)

RestoSearchCriteria - validation message text in 2 cases (min/max price) had no '_1_' placeholder, and was failing at runtime. - published March 19, 2009

The Member feature now demonstrates an easier way of deleting N items at a time, instead of 1 at a time. - published February 21, 2009

There are no updates to this application for this release of web4j.

If desired, however, you can now add an implementation of TimeSource as your fake system clock. See BuildImpl for related configuration information. - published December 21, 2008

This version is the first to use the web4j.jar having no time-limit on its operation. The distinction between the Trial Version and the Full Version no longer exists.

The following features, formerly available only in the Full Version, are now always available : - published September 20, 2008 - published August 30, 2008 - published July 21, 2008 - published June 7, 2008

Small update, mostly regarding unit testing :

For more information on unit testing, please see the User Guide. - published May 20, 2008

Uses web4j.jar version 3.7.0

Small update to documentation : - published May 12, 2008

Uses web4j.jar version 3.7.0

Small update : - published April 13, 2008

Uses web4j.jar version 3.6.1

Small update (backwards compatible): - published April 8, 2008

Uses web4j.jar version 3.6.1

Small update : - published March 11, 2008

Uses web4j.jar version 3.6.0

Small update : - published February 16, 2008

Uses web4j.jar version 3.5.0

Small update : - published January 22, 2008

Uses web4j.jar version 3.4.0

Small update : - published January 15, 2008

Uses web4j.jar version 3.3.1

Small update : - published December 19, 2007

Uses web4j.jar version 3.3.0

Small update : - published Nov 17, 2007

Uses web4j.jar version 3.2.0

Small update : - published Nov 15, 2007

Uses web4j.jar version 3.2.0

Small update : - published Nov 3, 2007

Uses web4j.jar version 3.1.0

Small update : - published Oct 31, 2007

Uses web4j.jar version 3.1.0

Small update : - published Oct 27, 2007

Uses web4j.jar version 3.1.0

Improvements :

Fixes : - published Sep 15, 2007

Uses web4j.jar version 3.0.0 - published Sep 8, 2007

Uses web4j.jar version 3.0.0

First published version.

Fish & Chips Club

Copyright Hirondelle Systems - Generated 2013Oct19.12.26