Sample applications that you can examine and deploy are included with the full installation of the Application Server. You can also download these samples separately if you installed the Application Server without them initially.
If installed with the Application Server, the samples are in the install-dir/samples directory. The samples are organized in categories such as ejb, jdbc, connectors, i18n, and so on. Each sample category is further divided into subcategories. For example, under the ejb category are stateless, stateful, security, mdb, bmp, and cmp subcategories.
Most Application Server samples have the following directory structure:
The docs directory contains instructions for how to use the sample.
The build.xml file defines asant targets for the sample (see asant Assembly and Deployment Tool.
The build and javadocs directories are generated as a result of targets specified in the build.xml file.
The src/java directory under each component contains source code for the sample.
The src/conf directory under each component contains the deployment descriptors.
With a few exceptions, sample applications follow the standard directory structure described here: http://java.sun.com/blueprints/code/projectconventions.html.
The install-dir/samples/common-ant.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 includes common-ant.xml.
For a detailed description of the helloworld sample and how to deploy and run it, see the associated documentation at:
install-dir/samples/ejb/stateless/apps/simple/docs/index.html
After you deploy the helloworld sample in Application Server, you can invoke it using the following URL:
http://server:port/helloworld