Author: jsong
Date: Thu Aug 5 16:34:39 2004
New Revision: 35756
Added:
incubator/beehive/trunk/controls/test/webapps/
incubator/beehive/trunk/controls/test/webapps/build.xml
incubator/beehive/trunk/controls/test/webapps/controlsWeb/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/Hello2Control.java
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/Hello2ControlImpl.jcs
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/HelloControl.java
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/HelloControlImpl.jcs
incubator/beehive/trunk/controls/test/webapps/controlsWeb/error.jsp
incubator/beehive/trunk/controls/test/webapps/controlsWeb/index.jsp
incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/
incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/Begin.jsp
incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/Controller.jpf
Log:
Add controls/test/webapps, which contains controlsWeb, a web application to
test controls runtime behavior in servlet container.
Added: incubator/beehive/trunk/controls/test/webapps/build.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/webapps/build.xml Thu Aug 5
16:34:39 2004
@@ -0,0 +1,240 @@
+<?xml version="1.0"?>
+
+<!--
+================================================================
+ This build is equivalent to netui/test/webapps/drt/build.xml
+================================================================
+-->
+
+<!--
+================================================================
+
+ This project is a test of using the test recorder against a
+ Tomcat web application. Below are targets that show how
+ the test recorder runs against Tomcat for running a test suite
+ against a running server, a test suite without the server running,
+ and a set of named tests against a running server.
+
+================================================================
+-->
+<project name="Beehive/Controls/TestControls-webapp" default="usage"
basedir=".">
+
+ <property environment="os"/>
+ <property file="${os.BEEHIVE_HOME}/beehive.properties"/>
+ <property file="${os.BEEHIVE_HOME}/netui/test/ant/test.properties"/>
+ <property file="${os.BEEHIVE_HOME}/netui/ant/bootstrap.properties"/>
+ <property file="${os.BEEHIVE_HOME}/netui/ant/common.properties"/>
+
+ <property name="webapp.name" value="controlsWeb"/>
+ <property name="webapp.waitfor.url"
value="http://localhost:8080/${webapp.name}"/>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for building a webapp -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="build" description="Build webapp">
+ <echo message="-----------------------------------------------------"/>
+ <echo message="| Beehive Controls controlsWeb build starting |"/>
+ <echo message="-----------------------------------------------------"/>
+
+ <property name="webapp.dir"
location="C:/beehive/work_dir/controls/test/webapps/${webapp.name}"/>
+
+ <ant antfile="${buildWebapp.ant}" target="deploy.netui"
inheritAll="false">
+ <property name="webapp.dir" value="${webapp.dir}" />
+ </ant>
+
+ <copy file="${webapp.dir}/WEB-INF/local-netui-config.xml"
+ tofile="${webapp.dir}/WEB-INF/${netuiconfig.xml.name}"
+ overwrite="true" failonerror="false"/>
+
+ <copy todir="${webapp.dir}/WEB-INF" file="${struts11.logic.tld}"/>
+ <copy todir="${webapp.dir}/WEB-INF" file="${struts11.html.tld}"/>
+ <copy todir="${webapp.dir}/WEB-INF" file="${struts11.bean.tld}"/>
+
+ <ant antfile="${buildWebapp.ant}" target="build.webapp"
inheritAll="false">
+ <property name="webapp.dir" location="${webapp.dir}"/>
+ </ant>
+
+ <echo message="----------------------------------------------"/>
+ <echo message="| Controls controlsWeb build ending |"/>
+ <echo message="----------------------------------------------"/>
+ </target>
+
+ <target name="clean" description="Clean webapp">
+ <echo message="----------------------------------------------"/>
+ <echo message="| Controls controlsWeb clean starting |"/>
+ <echo message="----------------------------------------------"/>
+
+ <ant antfile="${test.dir}/ant/buildWebapp.xml" target="undeploy.netui"
inheritAll="false">
+ <property name="webapp.dir"
location="${app.dir}/drt/${webapp.name}"/>
+ <property name="include.testrecorder" value="true"/>
+ </ant>
+ <ant antfile="${buildWebapp.ant}" target="clean.webapp"
inheritAll="false">
+ <property name="webapp.dir"
location="${app.dir}/drt/${webapp.name}"/>
+ </ant>
+
+ <echo message="----------------------------------------------"/>
+ <echo message="| Controls controlsWeb clean ending |"/>
+ <echo message="----------------------------------------------"/>
+ </target>
+
+ <target name="scrub" depends="clean" description="Scrub webapp">
+ <delete dir="${tomcat.dir}/work/Catalina/localhost/${webapp.name}"
includeEmptyDirs="true"/>
+ <delete
file="${tomcat.dir}/conf/Catalina/localhost/${webapp.name}.xml"/>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for running test recorder test suites -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="playback" description="Playback a specified list of test
recorder tests">
+ <ant antfile="${test.dir}/ant/testRecorder.xml" target="playback"
inheritAll="false">
+ <property name="testRecorder.config.name"
value="${testRecorder.config.name}"/>
+ </ant>
+ </target>
+
+ <target name="drt.running" description="Playback the 'drt' category to a
running server">
+ <ant antfile="${test.dir}/ant/testRecorder.xml"
target="suite.callback" inheritAll="false">
+ <property name="testRecorder.config.name"
value="${testRecorder.config.name}"/>
+ <property name="suite.name" value="drt"/>
+ <property name="waitfor.url" value="${webapp.waitfor.url}"/>
+ </ant>
+ </target>
+
+ <target name="bvt.running" description="Playback the 'bvt' category to a
running server">
+ <ant antfile="${test.dir}/ant/testRecorder.xml"
target="suite.callback" inheritAll="false">
+ <property name="testRecorder.config.name"
value="${testRecorder.config.name}"/>
+ <property name="suite.name" value="bvt"/>
+ <property name="waitfor.url" value="http://localhost:8080/"/>
+ </ant>
+ </target>
+
+ <target name="drt" description="Run the drt suite with full server start /
stop support.">
+ <ant dir="${test.dir}" antfile="${test.dir}/ant/testRecorder.xml"
inheritAll="false" target="server.test">
+ <property name="app.build.file"
location="${app.dir}/drt/build.xml"/>
+ <property name="waitfor.url" value="http://localhost:8080/"/>
+ <property name="testRecorder.config.name"
value="${testRecorder.config.name}"/>
+ <property name="suite.name" value="drt"/>
+ <property name="drt.mode" value="true"/>
+ </ant>
+ </target>
+
+ <target name="bvt" description="Run the bvt suite with full server start /
stop support.">
+ <ant antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false"
target="server.test">
+ <property name="app.build.file"
location="${app.dir}/drt/build.xml"/>
+ <property name="waitfor.url" value="http://localhost:8080/"/>
+ <property name="testRecorder.config.name"
value="${testRecorder.config.name}"/>
+ <property name="suite.name" value="bvt"/>
+ <property name="drt.mode" value="true"/>
+ </ant>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for deploying the webapp on a server -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="deploy" description="Deploy webapp">
+ <ant antfile="${runTomcat.ant}" target="deploy" inheritAll="false">
+ <property name="context.path" value="${webapp.name}"/>
+ <property name="webapp.root"
value="C:/beehive/work_dir/controls/test/webapps/${webapp.name}"/>
+ </ant>
+ </target>
+
+ <target name="undeploy" description="Undeploy webapp">
+ <ant antfile="${runTomcat.ant}" target="undeploy" inheritAll="false">
+ <property name="context.path" value="${webapp.name}"/>
+ </ant>
+ </target>
+
+ <target name="redeploy" description="Redeploy webapp">
+ <ant antfile="${runTomcat.ant}" target="redeploy" inheritAll="false">
+ <property name="context.path" value="${webapp.name}"/>
+ </ant>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for starting / stopping a server -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="start" description="Start server">
+ <ant antfile="${runTomcat.ant}" target="start" inheritAll="false"/>
+ </target>
+
+ <target name="start.with.shmem" description="Start server">
+ <ant antfile="${runTomcat.ant}" target="start.with.shmem"
inheritAll="false"/>
+ </target>
+
+ <target name="start.with.asserts" description="Start server with asserts
enabled for org.apache.beehive.netui">
+ <ant antfile="${runTomcat.ant}" target="start" inheritAll="false">
+ <property name="java.options"
value="-ea:org.apache.beehive.netui..."/>
+ </ant>
+ </target>
+
+ <target name="start.with.shmem.asserts" description="Start server with
asserts enabled for org.apache.beehive.netui">
+ <ant antfile="${runTomcat.ant}" target="start.with.shmem"
inheritAll="false">
+ <property name="java.options"
value="-ea:org.apache.beehive.netui..."/>
+ </ant>
+ </target>
+
+ <target name="stop" description="Stop server">
+ <ant antfile="${runTomcat.ant}" target="stop" inheritAll="false"/>
+ </target>
+
+ <target name="package.drts" description="Package the NetUI DRT
application.">
+ <antcall target="clean"/>
+
+ <mkdir dir="../../../build/drt"/>
+
+ <zip destfile="../../../build/drt/beehive-netui-drt.zip">
+ <zipfileset dir="." prefix="drt"/>
+ </zip>
+ </target>
+
+ <target name="usage">
+ <java fork="no" classname="org.apache.tools.ant.Main">
+ <arg line="-projecthelp"/>
+ </java>
+ </target>
+
+ <!-- todo: this needs to compost down into runTomcat.xml; until we're sure
it works, it stays here -->
+ <target name="ensure.deployed" description="Deploy webapp for the test
recorder">
+ <echo>Ensuring that the webapp ${webapp.name} is deployed on a running
server at the url ${webapp.waitfor.url}</echo>
+
+ <waitfor maxwait="5" maxwaitunit="second"
timeoutproperty="unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ <antcall target="do.deploy"/>
+ <antcall target="do.redeploy"/>
+ <fail if="still.unavailable" message="Couldn't find webapp with path
${webapp.waitfor.url}"/>
+ </target>
+
+ <target name="do.deploy" if="unavailable">
+ <echo>Webapp is not deployed; deploying</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second"
timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ </target>
+
+ <target name="do.redeploy" unless="unavailable">
+ <echo>Webapp is deployed; undeploy and redeploy</echo>
+
+ <antcall target="undeploy"/>
+ <echo>...undeploy complete</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second"
timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ </target>
+
+</project>
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/Hello2Control.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/Hello2Control.java
Thu Aug 5 16:34:39 2004
@@ -0,0 +1,17 @@
+//
+// Copyright � 2001-2002 BEA Systems. All rights reserved.
+//
+
+package org.apache.beehive.controls.test.controls.instantiate;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A simple control with one method
+ */
+
[EMAIL PROTECTED]
+public interface Hello2Control
+{
+ public String hello(String input);
+}
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/Hello2ControlImpl.jcs
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/org/apache/beehive/controls/test/controls/instantiate/Hello2ControlImpl.jcs
Thu Aug 5 16:34:39 2004
@@ -0,0 +1,15 @@
+package org.apache.beehive.controls.test.controls.instantiate;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+/**
+ * A simple control impl
+ */
[EMAIL PROTECTED]
+public class Hello2ControlImpl implements Hello2Control
+{
+ public String hello(String input)
+ {
+ return input;
+ }
+}
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/HelloControl.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/HelloControl.java
Thu Aug 5 16:34:39 2004
@@ -0,0 +1,17 @@
+//
+// Copyright � 2001-2002 BEA Systems. All rights reserved.
+//
+
+package org.apache.beehive.controls.test.controls.instantiate;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A simple control with one method
+ */
+
[EMAIL PROTECTED]
+public interface HelloControl
+{
+ public String hello(String input);
+}
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/HelloControlImpl.jcs
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/instantiate/HelloControlImpl.jcs
Thu Aug 5 16:34:39 2004
@@ -0,0 +1,15 @@
+package org.apache.beehive.controls.test.controls.instantiate;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+/**
+ * A simple control impl
+ */
[EMAIL PROTECTED]
+public class HelloControlImpl implements HelloControl
+{
+ public String hello(String input)
+ {
+ return input;
+ }
+}
Added: incubator/beehive/trunk/controls/test/webapps/controlsWeb/error.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/error.jsp Thu Aug
5 16:34:39 2004
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+Error page of controlWeb,
+</body>
+</html>
Added: incubator/beehive/trunk/controls/test/webapps/controlsWeb/index.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/index.jsp Thu Aug
5 16:34:39 2004
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+Welcome to controlWeb, a web app to test beehive controls
+</body>
+</html>
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/Begin.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/Begin.jsp
Thu Aug 5 16:34:39 2004
@@ -0,0 +1,10 @@
+<html>
+<body>
+Begin page of controlsWeb/result
+</body>
+</html>
+
+
+
+
+
Added:
incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/Controller.jpf
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/webapps/controlsWeb/results/Controller.jpf
Thu Aug 5 16:34:39 2004
@@ -0,0 +1,47 @@
+/*
+ * B E A S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002 BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use, or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package results;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * @jpf:forward name="begin" path="Begin.jsp"
+ */
[EMAIL PROTECTED](
+ forwards = {
+ @Jpf.Forward(
+ name = "begin",
+ path = "Begin.jsp")
+ })
+public class Controller extends PageFlowController
+{
+ /**
+ * @jpf:action
+ */
+ @Jpf.Action(
+ )
+ protected Forward begin(){
+ return new Forward("begin");
+ }
+}
+
+