Sun Microsystems Logo

 

 


Samples Directory Structure


The sample applications included as part of the Application Server are packaged according to a consistent directory structure. This structure is meant to represent a realistic approach to defining source code workspaces for J2EE applications. If you are establishing a source code directory structure for your own J2EE applications, you will find it useful to review the layout of the sample application source directories and how they are used in the Ant-based build environment.

The larger sample applications such as Java Pet Store are located directly under the directory:

<install_dir>/samples/blueprints/petstore1.4

The balance of the samples are arranged under various categories within the samples/ directory. For example, Adventure Builder 1.0.1  sample is collected under:

<install_dir>/samples/blueprints/adventure1.0.1.

For most samples, the following directories and files exist:

Directory or File Description
<sampleroot>/  

<samplename>.(ear|war)

Pre-built J2EE EAR/WAR file.

docs/

Sample setup instructions.

javadocs/

Location of Javadoc information when using "ant javadocs" to generate API documentation for a sample.

src/

Sample source code. Contains J2EE deployment descriptors.

sql/

Database setup scripts and DDL.

docroot/

Web content: JSPs, HTML, images, etc.

WEB-INF/

Tag library definition and resource files.

<packagename>/

Java source code (if any)

build/

Transient build area.
        assemble/
Transient assemble area.