Oracle GlassFish Server 3.0.1 Application Development Guide

Sample Applications

Sample applications that you can examine and deploy to the GlassFish Server are available. If you installed the GlassFish Server as part of installing the Java EE 6 SDK bundle from Java EE 6 Downloads, the samples may already be installed. You can download these samples separately from the Code Samples page if you installed the GlassFish Server without them initially.

Most GlassFish Server samples have the following directory structure:

With a few exceptions, sample applications follow the standard directory structure described here:

The samples-install-dir/bp-project/main.xml file defines properties common to all sample applications and implements targets needed to compile, assemble, deploy, and undeploy sample applications. In most sample applications, the build.xml file imports main.xml.

In addition to the Java EE 6 sample applications, samples are also available at GlassFish Samples and at as-install/glassfish/samples/.