Workload Management |
Building the BeenThere Sample with Ant build tool |
Getting started |
Identifying the directory structure |
Rebuilding and installing the Sample |
One of the great benefits of developing applications on a J2EE
platform is portability. All of the Sample programs in the Samples
Gallery are developed on a workstation and run on z/OS systems without
changing one line of Java code. By building J2EE applications on
Intel or UNIX systems, a developer can eliminate the challenges of
EBCDIC to ASCII or ASCII to EBCDIC file conversions.
The availability of tools makes it easy for developers to write and test
on a development workstation and install the enterprise archive (EAR)
files on z/OS systems.
Every WebSphere Application Server (Application Server) for z/OS
customer is entitled to the Application Server media for
multiplatforms. If you install the WebSphere Application Server base product and
the Samples on one of the platforms supported by this package you see
the same gallery. The one exception is
that when you click sample_name > Build with Ant > platform > Rebuilding and installing the sample.ear file, you get instructions to
rebuild the EAR file on that platform. Because text files in an
EAR file (XML, xmi, JavaServer Pages (JSP) files, and so on) must
be in an ASCII format, it is easier to edit those files on an ASCII
machine. If you make changes on an ASCII machine, you can then deploy and install the
resulting EAR file on the z/OS platform without an EBCDIC to ASCII
conversion.
Install WebSphere Application Server on the distributed platform of your choice and indicate to install Application Server Sample applications as well.
Make a backup copy of the <profile_root> directory before attempting to modify or rebuild the Samples. Create a zip file of the samples directory. You can restore the samples directory to its original state by extracting the zip file.
The Sample is build directory structure is as follows:
profile_root/samples/src/BeenThere | Contains the Sample source code for the BeenThere Sample. |
profile_root/samples/lib/BeenThere | Contains the BeenThere.ear file for the BeenThere Sample. |
profile_root/samples/javadoc/BeenThere | Contains the Javadoc documentation that generates when the BeenThere Sample is built. |
profile_root/samples/bld/BeenThere | Contains the generated class files. Use these class files to generate the final BeenThere.ear file. The bld directory is created after the BeenThere Sample is rebuilt. |
The following directions describe the steps to rebuild the Sample.
Follow these steps to run the Sample build script that rebuilds the Sample:
The Sample is now built.
Find the buildBeenThere.bat or the buildBeenThere.sh script in the profile_root/samples/bin/BeenThere directory. The scripts set the appropriate class path information and run the Ant build utility. The Ant utility reads the build.xml files, which describe how to build the Samples. Refer to the Jakarta Web site for additional documentation on Ant.
Use the File Transfer Protocol (FTP) to transfer the binary EAR file to the z/OS server, using the following instructions.
Reinstall the Sample as described in the following steps:
The rebuilt BeenThere.ear file is now deployed to your Application Servers.