Beehive Sample: NetUI Samples
Introduction
These samples show individual NetUI features, including:
- Page Flow Action Interceptors
- Exception Handling
- File Upload
- Page Flow Lifecycle
- Nested Page Flows
- Page Flow Inheritance
- Form Posting
- Page Inputs
- Message Resources
- Repeater Tag
- Datagrid Tag
- Tree Tag
- Popup Windows and Nested Page Flows
- Select Tag
- Form Tags in a JSP 2.0 .tag File
Running the Samples on Tomcat 5
The following explains how to run the samples on Tomcat 5. The sample will run on other web containers, but we have chosen Tomcat 5 for convenience.
To Set up the Environment
Before proceeding, complete all of the necessary and optional steps in the following topic: Beehive Installation and Setup
Open a command shell and confirm that you have set following variables:
- ANT_HOME
- JAVA_HOME
- CATALINA_HOME
Also ensure that the following elements are on your PATH:
- ANT_HOME/bin
- JAVA_HOME/bin
To Copy the Application to a Project Folder (Optional Step)
To keep your Beehive distribution directory pristine, you should copy the <BeehiveRoot>/samples/netui-samples folder to another location before proceeding.
The following instructions assume that you have copied the folder netui-samples into the directory /beehive_projects, resulting in the following directory structure.
/ beehive_projects netui-samples
For example, to build the sample, run the following Ant command:
ant -f <BeehiveRoot>/samples/netui-samples/src/WEB-INF/build.xml clean build war
To delete the sample's build directory, run the clean target:
ant -f <BeehiveRoot>/samples/netui-samples/src/WEB-INF/build.xml clean
Edit the build.properties File
In this section you will edit the build.properties file--the file that sets the build-related properties for your web application.
Open the file /beehive_projects/netui-samples/WEB-INF/src/build.properties in a text editor.
Edit the file so that the beehive.home property points to the top-level folder of your beehive installation. For example, if your beehive installation resides at /apache/apache-beehive-1.0, then your build.properties file would appear as follows.
beehive.home=/apache/apache-beehive-1.0 servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar context.path=netui-samples
To Compile the NetUI Samples Application
To compile the NetUI samples app, enter the following Ant command:
ant -f /beehive_projects/netui-samples/WEB-INF/src/build.xml clean build war Copy and Paste version: ant -f /beehive_projects/netui-samples/WEB-INF/src/build.xml clean build war
To Start Tomcat
To start Tomcat, run the following command:
%CATALINA_HOME%\bin\startup.bat
Or, on non-Windows systems,
$CATALINA_HOME/bin/startup.sh
To Deploy to Tomcat
To deploy the samples, copy the WAR file to Tomcat's webapps directory.
On Windows:
copy C:\beehive_projects\netui-samples.war %CATALINA_HOME%\webapps /Y
<?xml version="1.0" encoding="UTF-8"?>
<Context antiResourceLocking="true">
</Context>
Everywhere else:
cp /beehive_projects/netui-samples.war $CATALINA_HOME/webapps
Running
To browse the various feature samples: visit the following link in a browser: