Download the WEB4J Example Applications

Simplicity does not precede complexity, but follows it.
- Alan Perlis

There are two web4j example applications to choose from, one called Predictions, and one called Fish and Chips Club. When starting with web4j, the Predictions application is recommended, because:

The example applications aren't small. Those less experienced with Servlets will greatly benefit from first going through the tutorial.

Here's a high level comparison of the two example applications:

 PredictionsFish and Chips Club
Code Size42 classes99 classes
UI LanguageEnglishEnglish and French
Number of Databases13
EncodingUTF-8UTF-8
DatabaseMySQL 5MySQL 5
Access ControlPer User (web style)Per Role (intranet style)
reCaptcha AccountRequiredNot Required
Javadoclinklink
LicenseBSD Open SourceBSD Open Source
Download Link Download Predictions Example App Download Fish and Chips Club Example App

The web4j.jar binary is included in the example applications (and in the tutorial) at this location:

/WEB-INF/lib/web4j.jar

The 'look' of the example apps is simple - too simple for most real applications. It's important to note that WEB4J is a Java API, and it has little to say about the appearance of your web app. That is, you control the appearance of your apps using Cascading Style Sheets - not WEB4J.

To install the example applications, please follow closely the guidelines of the Getting Started Guide.

In general, WEB4J applications can interact with any relational database. The example applications, and their documentation, use MySQL. A script is provided for the creation and population of their databases. For the example apps, you're encouraged to use MySQL if possible. If that's not possible, then you will need to do more work to get them running, by reviewing and editing all items related to the database:

If you decide to use a postgres database, see this remark on adding a parameter to the connection URL. Two nerds discover true love and web4j In the same day. Coincidence?

System requirements are:

The javadoc (see table above) includes convenient links to source code, JSPs, and SQL statements. The source code is syntax-highlighted to make it easier to read.

The example applications are provided as both a starting point and as a guide. It's recommended, though not required, that your applications be created by starting with an example app, and then changing it gradually. If any items are undesired, then they are simply removed by deleting directories (and any links from menus). This is only possible because of the package-by-feature style recommended by WEB4J. (See the User Guide for more information.)

This approach is consistent with the following:

In any case, the classes in the example application are always effective guides.

The Fish & Chips Club serves as an informal "reference implementation", and exercises about 95% of the WEB4J API. It includes several modules:

Other Downloads

The following downloads are also available: For those stuck on JDK 1.5, the last version of web4j to be created using JDK 1.5 was 4.9.0: All items are released under a BSD License.