You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2004/10/09 01:12:23 UTC

svn commit: rev 54128 - in incubator/beehive/trunk/site/src/documentation/content/xdocs: . controls pageflow

Author: steveh
Date: Fri Oct  8 16:12:22 2004
New Revision: 54128

Added:
   incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/
   incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/index.xml   (contents, props changed)
   incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml   (contents, props changed)
   incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/
   incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/index.xml   (contents, props changed)
   incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml   (contents, props changed)
   incubator/beehive/trunk/site/src/documentation/content/xdocs/reference.xml   (contents, props changed)
Modified:
   incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml
Log:
Updating TOC to reflect new content (tutorials and reference docs).

Added: incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/index.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/index.xml	Fri Oct  8 16:12:22 2004
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v12.dtd">
+<document>
+	<header>
+		<title>Introduction to Beehive Page Flows</title>
+	</header>
+	<body>
+		<section id="advantages">
+			<title>Why Use Page Flows?</title>
+			<p>By using page flows, you can avoid making the typical mistakes that often 
+				      happen during web application development, by separating presentation, business 
+				      logic implementation, and navigational control. In many web applications, 
+				      web developers using JSP (or any of the other dynamic web languages such 
+				      as ASP or CFM) combine presentation and business logic in their web pages. 
+				    </p>
+			<p>As these applications grow in complexity and are subject to continual change, 
+				      this practice leads to expensive, time-consuming maintenance problems, caused 
+				      by:</p>
+			<ul>
+				<li> 
+					 Limited reuse of business logic 
+				      </li>
+				<li> 
+					 Cluttered JSP source code 
+				      </li>
+				<li>Unintended exposure of business-logic code to team members who focus 
+					on other aspects of web development, such as content writers and visual 
+					designers</li>
+			</ul>
+			<p>Page flows allow you to separate the user interface code from navigational 
+				      control and other business logic. User interface code can be placed where 
+				      it belongs, in the JSP files. Navigational control can be implemented easily 
+				      in a page flow's single controller file, which is the nerve center of your 
+				      web application. A controller file is a special Java file that uses a JPF 
+				      file extension. Business logic can be implemented in the page controller 
+				      file, or in Java controls that you call from JPF files.</p>
+			<p>The separation of presentation and business logic offers a big advantage 
+				      to development teams. For example, you can make site navigation updates 
+				      in a single JPF file, instead of having to search through many JSP files 
+				      and make multiple updates. In WebLogic Workshop you can as easily navigate 
+				      between page flows as between individual JSP pages. This allows you to group 
+				      related web pages under one page flow, and create functionally modular web 
+				      components. This approach to organizing the entities that comprise web applications 
+				      makes it much easier to maintain and enhance web applications by minimizing 
+				      the number of files that have to be updated to implement changes, and lowers 
+				      the cost of maintaining and enhancing applications.</p>
+			<p>Another advantage of page flows is that an instance of the page flow controller 
+				      class is kept alive on a per-user-session basis while the user is navigating 
+				      within the scope of the page flow. This instance ends when the user exits 
+				      from the page flow. You can use instance member variables in page flow classes 
+				      to hold user session state.</p>
+		</section>
+		<section id="work">
+			<title>How Does a Page Flow Work?</title>
+			<p>A page flow is a Java class, called the &quot;controller&quot; class, that 
+      controls the behavior of a web application through the use of specially 
+      designed annotations and methods. The directory that contains the controller 
+      class also includes the JavaServer Pages (JSPs) used in the page flow. For 
+      a JSP to be considered part of a page flow, it must reside within the page 
+      flow directory. The JSP files use special tags which help bind to data and 
+      business logic actions. The action methods in the controller file implement 
+      code that can result in site navigation, passing data, or invoking back-end 
+      business logic via controls. Significantly, the business logic in the controller 
+      class is separate from the presentation code defined in the JSP files.</p>
+			<p>The overall purpose of a page flow is to provide you with an easy-to-use 
+      framework for building dynamic, sophisticated web applications. WebLogic 
+      Workshop provides graphical and code-level tools to simplify the development 
+      cycle. While page flows give you access to advanced features of J2EE, you 
+      do not have to be a J2EE expert to quickly develop and deploy Java-based 
+      applications built on page flows. Wizards can be used to create different 
+      types of page flows, generating the Java and JSP files that serve as a starting 
+      point for your work. Graphical tools let you draw the relationships between 
+      web components in a controller's Flow View. In Source View, syntax completion, 
+      validation, and other programmer's aids reduce the amount of work required 
+      to get your application running.</p>
+			<p>
+				<strong>Note</strong>: WebLogic Workshop's web application 
+      functionality is built on Struts, which is an open-source framework for 
+      building web applications in a J2EE environment.</p>
+		</section>
+		<section id="components">
+			<title>Components of the Page Flow Programming Model</title>
+			<p>Page flows implement user interface control logic, and contain:</p>
+			<ul>
+				<li>Action Methods</li>
+				<li>Form Beans</li>
+				<li>Forward Objects</li>
+				<li>The &lt;netui...&gt; Tag Library</li>
+			</ul>
+			<section id="actionmethods">
+				<title>Action Methods</title>
+				<p>In the controller class, action methods are methods that are annotated with a <code>@JpfAction</code> tag.</p>
+				<p>
+					<code>
+@JpfAction(forwards = {
+@JpfForward(name="success", path="page_A.jsp") 
+ } 
+ )
+    protected Forward begin()
+    {
+        return new Forward( "success" );
+    }</code>
+				</p>
+				<p> Action methods can perform several functions. They can (1) implement navigation 
+      decisions, (2) move data into and out of JSP pages, and (3) invoke back-end 
+      business logic via calls to controls.</p>
+			</section>
+			<section id="formbeans">
+				<title>Form Beans</title>
+				<p>Form Beans are Java data structures that correspond to HTML forms. When a user submits data from an HTML form, the data is stored in a Form Bean instance. Once the data is stored in a Form Bean instance, the data is available for processing by the action methods in the controller file. Form Bean instances (containing submitted data) are typically passed as parameters to action methods.
+
+<code>	@JpfAction()
+
+     protected Forward ProcessData( MyFormBean form )
+    {
+
+        //Submitted data is processed here...
+
+    }</code></p>
+<p>
+<code>Form Beans are simple Java classes contained within the controller file. They consist of some number of fields with setter and getter methods associated with those fields. Below is a Form Bean with one field, the String name, and setter and getter methods for that field. Form Bean must extend the class com.bea.wlw.netui.pageflow.FormData.
+
+    public static class MyFormBean extends FormData
+    {
+        private String name;
+
+        public void setName(String name)
+        {
+            this.name = name;
+        }
+
+        public String getName()
+        {
+            return this.name;
+        }</code></p>
+			</section>
+			<section>
+				<title>Forward Objects</title>
+				<p>Forward objects are returned by action methods. They can be used to control navigation and pass data throughout the application.</p>
+			</section>
+			<section>
+				<title>The &lt;netui> Tag Library</title>
+				<p>The &lt;netui> tag library contains JSP tags specifically designed to work with the controller class. Tags in the library all begin with the prefixes "netui", "netui-databinding", and "netui-template". Some of these tags perform much like familiar HTML tags, while others perform function particular to page flow web applications. The most important feature of the tag library is its ability to "data bind" to data in the controller file. Data binding allows the JSP pages to both read from and write to Java code in the controller class. This is accomplished without placing any Java code on the JSP pages, greatly enhancing the separation of data presentation and data processing.</p>
+			</section>
+		</section>
+		<section>
+			<title>Example Code</title>
+			<section>
+				<title>Navigation</title>
+				<p>As shown in the Flow View diagram, the page flow class defines an action method named toPageB. This action can be invoked by a link on the JSP page page_A.jsp.
+
+page_A.jsp
+
+    &lt;%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
+	...
+	&lt;netui:anchor action="toPageB">Link to page_B.jsp&lt;/netui:anchor></p>
+
+<p>A special JSP tag library named netui-tags-html.tld is referenced. WebLogic Workshop provides this tag library and several others to help you develop dynamic web applications. The &lt;netui:anchor...> tag used here is simply invoking an action (toPageB) with a hyperlink. (For more information about the page flow tag library, see Designing User Interfaces in JSPs.) </p>
+
+<p>In the controller file SimpleNavigationController.jpf, the toPageB action method is defined as follows:
+
+SimpleNavigationController.jpf
+
+    import com.bea.wlw.netui.pageflow.Forward;
+	
+	...
+	
+
+@JpfAction(forwards = {
+   @JpfForward(name="success", path="page_B.jsp")
+ })
+
+    public Forward toPageB()
+    {
+        return new Forward( "success" );
+    }</p>
+
+<p>When the link on page_A.jsp is clicked, the page flow runtime detects the action and runs the toPageB action method. This action method is coded to return a Forward object which passes the parameter "success". (Notice that this name "success" matches the name on the corresponding action arrow in Flow View.)</p>
+
+<p>Look at the two @Jpf annotations that appear on the lines above this action method. These annotations are enclosed in Javadoc comments. The @JpfAction tag indicates that the toPageB method is an action method. The @JpfForward tag describes the behavior of that method.</p>
+
+<p>Putting it all together, a Forward object is returned by an action method. The Forward object passes the string "success", indicating that it should behave according to the directions encoded in the annotation @JpfForward name="success". That annotation's path attribute has the value "page_B.jsp", which causes the page flow controller to load page_B.jsp into the browser.</p>
+
+<p>The following diagram summarizes the flow in the example:</p>
+
+
+
+<p>To change the navigation target of this action method, simply change the value of the path attribute. For example, if you want this action method to navigate to page_C.jsp, you would make the following change to the controller file (no change to the JSP page is necessary).
+
+
+
+@JpfAction(forwards = {
+   @JpfForward(name="success", path="page_C.jsp")
+ })
+
+    public Forward toPageB()
+    {
+        return new Forward( "success" );
+    }</p>
+
+<p>As you will see in later sections, the WebLogic Workshop IDE generates this code for you when you create a new page flow or JSP file from the graphical view. This code generation and subsequent validation of your changes saves you considerable time.</p>
+			</section>
+			<section>
+				<title>Submitting Data</title>
+<p>Suppose you want to your web application to collect data from users and then process that data in some way. The following example demonstrates how to set up a data submission process using page flows. The sample code referred to in this example can be found at: </p>
+
+<p>&lt;BEA_HOME>\weblogic90\samples\workshop\SamplesApp\WebApp\handlingData\simpleSubmit\
+</p>
+<p>Submitting data is a two step process: (1) the data submitted from a JSP page is loaded into a Form Bean instance and (2) the Form Bean instance is passed to an action method for processing.</p>
+
+
+
+<p>Form Beans are simple Java classes with fields and setter and getter methods for accessing those fields. Form Beans classes are contained within the controller file. In most cases, Form Beans are designed to accept data submitted from JSP forms. For example, if a JSP page has input elements for name, eye_color, and height, then the Form Bean will have corresponding fields for name, eye_color, and height. The following example Form Bean can be found in the controller file SimpleSubmitController.jpf. It contains one field, name, and setter and getter methods for that field.</p>
+
+<p>SimpleSubmitController.jpf
+
+    public class SimpleSubmitController extends PageFlowController
+    {
+    
+    ...
+ 
+      public static class SubmitNameForm extends FormData
+        {
+            private String name;
+    
+            public void setName(String name)
+            {
+                this.name = name;
+            }
+    
+            public String getName()
+            {
+                return this.name;
+            }
+        }
+    }</p>
+
+<p>The input elements on the JSP page are said to be "data bound" to the fields in the Form Bean. Data binding allows the the data submitted from the JSP page to be loaded into the Form Bean instance. For example, the input element on index.jsp contains a data binding expression that refers to the name field of the Form Bean: {actionForm.name}. The expression "actionForm" refers to the Form Bean SubmitNameForm, the property ".name" refers to the name field of the Form Bean. For detailed information about data binding see Using Data Binding in Page Flows.</p>
+
+<p>index.jsp</p>
+
+<p>        &lt;netui:form action="SubmitName">
+            Name: &lt;netui:textBox dataSource="{actionForm.name}"/>
+            ....        
+        &lt;/netui:form></p>
+
+<p>Finally the Form Bean instance (carrying the submitted data) is passed to the action method for processing.</p>
+
+
+
+<p>@JpfAction(forwards = {
+   @JpfForward(name="success", path="showName.jsp")
+ })
+
+    protected Forward SubmitName(SubmitNameForm form)
+    {
+        //
+        // The data is processed here
+        //
+
+        return new Forward("success");
+    }</p>
+
+<p>The submitted data can be accessed by calling the getter methods on the Form Bean.</p>
+
+<p>@JpfAction(forwards = {
+   @JpfForward(name="success", path="showName.jsp")
+ })
+    protected Forward SubmitName(SubmitNameForm form)
+    {
+        if( form.getName() != null )
+			// do something here
+        else 
+            // do something else here
+
+        return new Forward("success");
+    }</p>
+
+<p>By default the Form Bean instance that is passed to the action method exists only as long as the HTTP request. This is called a "request-scoped Form Bean". When the HTTP request is destroyed, the Form Bean instance, along with the user submitted data, is destroyed. As an alternative, you can use a Page Flow-scoped Form Bean, which has a longer life cycle. For details see Form Bean Scopings.</p>
+				
+			</section>
+			<section>
+				<title>Displaying Data</title>
+<p>Suppose that once you have collected data, you want to display it back to the user. The following example shows how to use data binding to display data to the user. The sample code referred to can be found at: </p>
+
+<p>&lt;BEA_HOME>\weblogic81\samples\workshop\SamplesApp\WebApp\handlingData\simpleSubmit\</p>
+
+<p>Displaying data using data binding requires that (1) the data is located somewhere where it can accessed by the JSP page and (2) the JSP page uses a data binding expression to retrieve the data from that location.</p>
+
+
+
+<p>Notice the syntax of data binding expression on the JSP page. (1) It is framed by curley braces, (2) it begins with a data binding context, in this case the request context, and (3) the context is followed by an attribute, in this case "name".</p>
+
+<p>In the following example, an action method places data on the name attribute of the request object.</p>
+
+<p>SimpleSubmitController.jpf
+
+
+@JpfAction(forwards = {
+   @JpfForward(name="success", path="showName.jsp")
+ })
+
+    protected Forward SubmitName(SubmitNameForm form)
+    {
+        getRequest().setAttribute("name", form.getName());
+        return new Forward("success");
+    }</p>
+
+<p>After the data has been located on the name attribute of the request object, it is displayed on a JSP page using a data binding expression.</p>
+
+<p>showName.jsp</p>
+
+<p>    Here is the data you submitted: &lt;netui:label value="{request.name}" /></p>
+
+<p>Note that the request object has a relatively short life-cycle. When the user makes a new request, by navigating to a new JSP page or invoking another action method, the current request object is destroyed along with the data it contains. If your application requires the data to be more persistent, then you could use a different data binding context, for example the session object or a Page Flow-scoped Form Bean, which both have longer life-cycles. For detailed information about the different data binding contexts available, see Using Data Binding in Page Flows.				</p>
+			</section>
+			<section>
+				<title>Connecting to Resources with Controls</title>
+				<p>[tbd]</p>
+			</section>
+		</section>
+	</body>
+	<footer>
+		<legal>Java, J2EE, and JCP are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.<br/>
+	&copy; 2004, Apache Software Foundation
+	</legal>
+	</footer>
+</document>

Added: incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml	Fri Oct  8 16:12:22 2004
@@ -0,0 +1,499 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
+<document>
+	<header>
+		<title>Beehive Controls Tutorial</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction</title>
+			<section>
+				<title>Tutorial Goals</title>
+				<p>In this tutorial, you will learn:</p>
+				<ul>
+					<li>What Beehive Controls are for and what they do</li>
+					<li>How to create a Beehive Control interface and implementation</li>
+					<li>How to compile a Beehive Control</li>
+					<li>How to use a Beehive Control as a component in a larger application</li>
+					<li>How to use metadata annotations in Beehive Controls</li>
+					<li>How to create custom metadata annotations</li>
+				</ul>
+			</section>
+		</section>
+		<section id="step1">
+			<title>Step 1: Begin the Controls Tutorial</title>
+			<section>
+				<title/>
+			</section>
+			<section>
+				<title>Download and Install JDK5</title>
+				<p>If you do not have JDK5 installed on your machine, visit <fork href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</fork> and download the latest version of JDK5.</p>
+				<p>[tbd]</p>
+			</section>
+			<section>
+				<title>Download and Install SVN (Subversion Source Control)</title>
+				<p>Visit <fork href="http://subversion.tigris.org">http://subversion.tigris.org</fork> and install the SVN source control system.[tbd]</p>
+			</section>
+			<section>
+				<title>Download and Install Beehive</title>
+				<p>
+					Create a directory called <code>beehive-src</code> on your C: drive.  Confirm that the the following directory structure exists: <code>C:/beehive-src</code>.  This directory will store the Beehive source and all of your Beehive projects.				</p>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>cd beehive-src</code>
+				</p>
+				<p>At the command prompt, enter: <code>svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</code>
+				</p>
+				<p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p>
+				<p>At the command prompt, enter: <code>exit</code>
+				</p>
+			</section>
+			<section>
+				<title>Install ANT</title>
+				<p>Create a directory named <code>installed</code>at <code>C:/beehive-src/trunk/installed</code>.</p>
+				<p>Unzip the file <code>C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</code> into <code>C:/beehive-src/Beehive/installed</code>.</p>
+				<p>After the file has unzipped, confirm that the following directory structure exists: <code>C:/beehive-src/trunk/installed/apache-ant-1.6.2</code>.</p>
+			</section>
+			<section>
+				<title>Run the <code>bootstrap</code> Target</title>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>set BEEHIVE_HOME=C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter:  <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant bootstrap</code>
+				</p>
+				<p>At the command prompt, enter: <code>exit</code>
+				</p>
+			</section>
+		</section>
+		<section id="step_2">
+			<title>Step 2: Create Control Implementation and Interface Files</title>
+			<section>
+				<title>Introduction</title>
+				<p>
+					[tbd]
+				</p>
+			</section>
+			<section>
+				<title>To Create a Control's Implementation File</title>
+				<p>In this step you will create the implementation file for your Beehive Control.  This file is a JAVA file, that contains the bulk of your Control's working code.</p>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps</code>, create a directory called <code>control_tutorial</code>.</p>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, create a file called <code>HelloImpl.jcs</code>.</p>
+				<p>In a text editor (or your IDE of choice), open the file HelloImpl.jcs.</p>
+				<p>Edit HelloImpl.jcs so it appears as follows.</p>
+				<source><![CDATA[
+package hellocontrol; 
+
+import org.apache.beehive.controls.api.bean.*;
+
+@ControlImplementation
+public class HelloImpl implements Hello
+{ 
+    public String hello()
+    {
+        return "Hello, World!";
+    }
+}
+				]]></source>
+			</section>
+			<section>
+				<title>To Create the Control's Interface File</title>
+				<p>The interface file is a JAVA file, that defines the public face of your control. [tbd]</p>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, create a file named <code>Hello.java</code>.</p>
+				<p>Edit index.jsp so it looks like the following.</p>
+			<source><![CDATA[ 
+package hellocontrol; 
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface
+public interface Hello
+{ 
+    public String hello();
+}			
+			]]></source>
+			</section>
+			<section>
+				<title>To Create the WEB-INF directory</title>
+				<p>	Open a command shell.</p>
+				<p>At the command prompt, enter:  <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\netui\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>Compile the Control</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>Create a JSP Page to Test the Control</title>
+				<p>To test your Beehive Control, you need to call the control from some other resource, such as a JAVA application, JSP page, or Page Flow web application.  In this step you will call the 
+				control from a JSP page.
+				</p>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, create a file named <code>HelloPage.jsp</code>.
+				</p>
+				<p>HelloPage.jsp so it appears as follows.</p>
+				<source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>Web Application Page</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+    <p>
+      <jsp:useBean class="hellocontrol.Hello" id="helloBean" scope="session"/>
+	<jsp:getProperty name="helloBean" property="hello"/>
+    </p>
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Control</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/control_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+			</section>
+		</section>
+		<section id="step_3">
+			<title>Step 3: Navigation</title>
+			<section>
+				<title>Create a Destination JSP Page</title>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, create a file named <code>page2.jsp</code>.</p>
+				<p>Edit page2.jsp so it looks like the following.</p>
+				<source><![CDATA[					
+				]]></source>
+			</section>
+			<section>
+				<title>Create a Link to the Destination Page</title>
+				<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/index.jsp.</p>
+				<p>Edit index.jsp so it appears as follows.</p>
+				<source><![CDATA[
+				]]></source>
+			</section>
+			<section>
+				<title>Add an Action Method to Handle the Link</title>
+				<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/Controller.jpf.</p>
+				<p>Edit Controller.jpf so it appears as follows.</p>
+				<source><![CDATA[
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+ 
+public class Controller 
+    extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="index.jsp")
+        }
+    )
+    protected Forward begin()
+    {
+        return new Forward("success");
+    }
+
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="page2.jsp")
+        }
+    )
+    public Forward toPage2()
+    {
+        return new Forward("success");
+    }
+}
+				]]></source>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/control_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+				<p>Click the link.</p>
+				<p>You will be directed to page2.jsp.</p>
+			</section>
+			<section>
+				<title>Shutdown Tomcat Server</title>
+				<p>At the command prompt, enter: <code>shutdown.bat</code>
+				</p>
+			</section>
+		</section>
+		<section id="step_4">
+			<title>Step 4: Submitting Data</title>
+			<section>
+				<title>To Create a Submission Form</title>
+				<p>Edit the file <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/page2.jsp</code> so it appears as follows.</p>
+				<source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>page2.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+    <p>
+      Welcome to page2.jsp!
+    </p>
+    <p>
+      <netui:form action="processData">
+        <p>Name:<netui:textBox dataSource="actionForm.name"/>
+        <p>Age:<netui:textBox dataSource="actionForm.age"/>
+       <p><netui:button type="submit">Submit</netui:button>
+      </netui:form>
+    </p>	
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>To Edit the Controller File to Handle the Submitted Data</title>
+				<p>Open the file <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/Controller.jpf</code>
+				</p>
+				<p>Edit Controller.jpf so it appears as follows.</p>
+				<source><![CDATA[
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.netui.pageflow.FormData;
+ 
+@Jpf.Controller
+public class Controller extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="index.jsp")
+        }
+    )
+    public Forward begin()
+    {
+        return new Forward("success");
+    }
+
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="page2.jsp")
+        }
+    )
+    public Forward toPage2()
+    {
+        return new Forward("success");
+    }
+
+    @Jpf.Action(
+        forwards = { 
+            @Jpf.Forward(name = "success", path = "showData.jsp")
+        }
+    )
+    public Forward processData(ProcessDataForm form)
+    {
+	    System.out.println("Name: " + form.name);
+	    System.out.println("Age: " + form.age);
+        return new Forward("success");
+    }
+
+    public static class ProcessDataForm extends FormData
+    {
+        private int age;
+        private String name;
+
+        public void setName(String name)
+        {
+            this.name = name;
+        }
+
+        public String getName()
+        {
+            return this.name;
+        }
+
+        public void setAge(int age)
+        {
+            this.age = age;
+        }
+
+        public int getAge()
+        {
+            return this.age;
+        }
+    }
+}
+				]]></source>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/control_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+				<p>Click the link.</p>
+				<p>You will be directed to page2.jsp.</p>
+			</section>
+			<section>
+				<title>Shutdown Tomcat Server</title>
+				<p>At the command prompt, enter: <code>shutdown.bat</code>
+				</p>
+			</section>
+		</section>
+		<section id="step_5">
+			<title>Step 5: Processing and Displaying Data</title>
+			<section>
+				<title>To Process the Submitted Data</title>
+				<p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p>
+				<source><![CDATA[
+@Jpf.Action(
+	forwards = { 
+		@Jpf.Forward( name = "success", path = "showData.jsp" )
+	}
+)
+public Forward processData( ProcessDataForm form )
+{
+	System.out.println("Name: " + form.name);
+	System.out.println("Age: " + form.age);
+	getRequest().setAttribute("data", form);
+	return new Forward("success");
+}
+				]]></source>
+			</section>
+			<section>
+				<title>To Create a JSP Page to Display Submitted Data</title>
+				<p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/control_tutorial. Edit showData.jsp so it appears as follows.</p>
+				<source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>showData.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+      <p>Name:<netui:span value="${requestScope.data.name}"/>
+      <p>Age:<netui:span value="${requestScope.data.age}"/>
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/control_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+				<p>Click the link.</p>
+				<p>You will be directed to page2.jsp.</p>
+			</section>
+			<section>
+				<title>Shutdown Tomcat Server</title>
+				<p>At the command prompt, enter: <code>shutdown.bat</code>
+				</p>
+			</section>
+		</section>
+		<section id="summary">
+			<title>Summary: Page Flow Tutorial</title>
+			<p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p>
+			<p>Concepts and Tasks Introduced in This Tutorial</p>
+			<ul>
+				<li>JSP files make up the presentation layer of a web application</li>
+				<li>JPF files contain the code, individual Action methods, that determines the major features of a Workshop web application: how users navigate from page to page, and how data moves around the application.</li>
+				<li>User input data is data bound to Form Beans before the data is submitted to an Action method.</li>
+				<li>You can use the &lt;netui...> tag library to data bind to Java objects and render them as HTML</li>
+			</ul>
+		</section>
+	</body>
+	<footer>
+		<legal>Java, J2EE, and JCP are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.<br/>
+	&copy; 2004, Apache Software Foundation
+	</legal>
+	</footer>
+</document>

Added: incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/index.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/index.xml	Fri Oct  8 16:12:22 2004
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v12.dtd">
+<document>
+	<header>
+		<title>Introduction to Beehive Page Flows</title>
+	</header>
+	<body>
+		<section id="advantages">
+			<title>Why Use Page Flows?</title>
+			<p>By using page flows, you can avoid making the typical mistakes that often 
+				      happen during web application development, by separating presentation, business 
+				      logic implementation, and navigational control. In many web applications, 
+				      web developers using JSP (or any of the other dynamic web languages such 
+				      as ASP or CFM) combine presentation and business logic in their web pages. 
+				    </p>
+			<p>As these applications grow in complexity and are subject to continual change, 
+				      this practice leads to expensive, time-consuming maintenance problems, caused 
+				      by:</p>
+			<ul>
+				<li> 
+					 Limited reuse of business logic 
+				      </li>
+				<li> 
+					 Cluttered JSP source code 
+				      </li>
+				<li>Unintended exposure of business-logic code to team members who focus 
+					on other aspects of web development, such as content writers and visual 
+					designers</li>
+			</ul>
+			<p>Page flows allow you to separate the user interface code from navigational 
+				      control and other business logic. User interface code can be placed where 
+				      it belongs, in the JSP files. Navigational control can be implemented easily 
+				      in a page flow's single controller file, which is the nerve center of your 
+				      web application. A controller file is a special Java file that uses a JPF 
+				      file extension. Business logic can be implemented in the page controller 
+				      file, or in Java controls that you call from JPF files.</p>
+			<p>The separation of presentation and business logic offers a big advantage 
+				      to development teams. For example, you can make site navigation updates 
+				      in a single JPF file, instead of having to search through many JSP files 
+				      and make multiple updates. In WebLogic Workshop you can as easily navigate 
+				      between page flows as between individual JSP pages. This allows you to group 
+				      related web pages under one page flow, and create functionally modular web 
+				      components. This approach to organizing the entities that comprise web applications 
+				      makes it much easier to maintain and enhance web applications by minimizing 
+				      the number of files that have to be updated to implement changes, and lowers 
+				      the cost of maintaining and enhancing applications.</p>
+			<p>Another advantage of page flows is that an instance of the page flow controller 
+				      class is kept alive on a per-user-session basis while the user is navigating 
+				      within the scope of the page flow. This instance ends when the user exits 
+				      from the page flow. You can use instance member variables in page flow classes 
+				      to hold user session state.</p>
+		</section>
+		<section id="work">
+			<title>How Does a Page Flow Work?</title>
+			<p>A page flow is a Java class, called the &quot;controller&quot; class, that 
+      controls the behavior of a web application through the use of specially 
+      designed annotations and methods. The directory that contains the controller 
+      class also includes the JavaServer Pages (JSPs) used in the page flow. For 
+      a JSP to be considered part of a page flow, it must reside within the page 
+      flow directory. The JSP files use special tags which help bind to data and 
+      business logic actions. The action methods in the controller file implement 
+      code that can result in site navigation, passing data, or invoking back-end 
+      business logic via controls. Significantly, the business logic in the controller 
+      class is separate from the presentation code defined in the JSP files.</p>
+			<p>The overall purpose of a page flow is to provide you with an easy-to-use 
+      framework for building dynamic, sophisticated web applications. WebLogic 
+      Workshop provides graphical and code-level tools to simplify the development 
+      cycle. While page flows give you access to advanced features of J2EE, you 
+      do not have to be a J2EE expert to quickly develop and deploy Java-based 
+      applications built on page flows. Wizards can be used to create different 
+      types of page flows, generating the Java and JSP files that serve as a starting 
+      point for your work. Graphical tools let you draw the relationships between 
+      web components in a controller's Flow View. In Source View, syntax completion, 
+      validation, and other programmer's aids reduce the amount of work required 
+      to get your application running.</p>
+			<p>
+				<strong>Note</strong>: WebLogic Workshop's web application 
+      functionality is built on Struts, which is an open-source framework for 
+      building web applications in a J2EE environment.</p>
+		</section>
+		<section id="components">
+			<title>Components of the Page Flow Programming Model</title>
+			<p>Page flows implement user interface control logic, and contain:</p>
+			<ul>
+				<li>Action Methods</li>
+				<li>Form Beans</li>
+				<li>Forward Objects</li>
+				<li>The &lt;netui...&gt; Tag Library</li>
+			</ul>
+			<section id="actionmethods">
+				<title>Action Methods</title>
+				<p>In the controller class, action methods are methods that are annotated with a <code>@JpfAction</code> tag.</p>
+				<p>
+					<code>
+@JpfAction(forwards = {
+@JpfForward(name="success", path="page_A.jsp") 
+ } 
+ )
+    protected Forward begin()
+    {
+        return new Forward( "success" );
+    }</code>
+				</p>
+				<p> Action methods can perform several functions. They can (1) implement navigation 
+      decisions, (2) move data into and out of JSP pages, and (3) invoke back-end 
+      business logic via calls to controls.</p>
+			</section>
+			<section id="formbeans">
+				<title>Form Beans</title>
+				<p>Form Beans are Java data structures that correspond to HTML forms. When a user submits data from an HTML form, the data is stored in a Form Bean instance. Once the data is stored in a Form Bean instance, the data is available for processing by the action methods in the controller file. Form Bean instances (containing submitted data) are typically passed as parameters to action methods.
+
+<code>	@JpfAction()
+
+     protected Forward ProcessData( MyFormBean form )
+    {
+
+        //Submitted data is processed here...
+
+    }</code></p>
+<p>
+<code>Form Beans are simple Java classes contained within the controller file. They consist of some number of fields with setter and getter methods associated with those fields. Below is a Form Bean with one field, the String name, and setter and getter methods for that field. Form Bean must extend the class com.bea.wlw.netui.pageflow.FormData.
+
+    public static class MyFormBean extends FormData
+    {
+        private String name;
+
+        public void setName(String name)
+        {
+            this.name = name;
+        }
+
+        public String getName()
+        {
+            return this.name;
+        }</code></p>
+			</section>
+			<section>
+				<title>Forward Objects</title>
+				<p>Forward objects are returned by action methods. They can be used to control navigation and pass data throughout the application.</p>
+			</section>
+			<section>
+				<title>The &lt;netui> Tag Library</title>
+				<p>The &lt;netui> tag library contains JSP tags specifically designed to work with the controller class. Tags in the library all begin with the prefixes "netui", "netui-databinding", and "netui-template". Some of these tags perform much like familiar HTML tags, while others perform function particular to page flow web applications. The most important feature of the tag library is its ability to "data bind" to data in the controller file. Data binding allows the JSP pages to both read from and write to Java code in the controller class. This is accomplished without placing any Java code on the JSP pages, greatly enhancing the separation of data presentation and data processing.</p>
+			</section>
+		</section>
+		<section>
+			<title>Example Code</title>
+			<section>
+				<title>Navigation</title>
+				<p>As shown in the Flow View diagram, the page flow class defines an action method named toPageB. This action can be invoked by a link on the JSP page page_A.jsp.
+
+page_A.jsp
+
+    &lt;%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
+	...
+	&lt;netui:anchor action="toPageB">Link to page_B.jsp&lt;/netui:anchor></p>
+
+<p>A special JSP tag library named netui-tags-html.tld is referenced. WebLogic Workshop provides this tag library and several others to help you develop dynamic web applications. The &lt;netui:anchor...> tag used here is simply invoking an action (toPageB) with a hyperlink. (For more information about the page flow tag library, see Designing User Interfaces in JSPs.) </p>
+
+<p>In the controller file SimpleNavigationController.jpf, the toPageB action method is defined as follows:
+
+SimpleNavigationController.jpf
+
+    import com.bea.wlw.netui.pageflow.Forward;
+	
+	...
+	
+
+@JpfAction(forwards = {
+   @JpfForward(name="success", path="page_B.jsp")
+ })
+
+    public Forward toPageB()
+    {
+        return new Forward( "success" );
+    }</p>
+
+<p>When the link on page_A.jsp is clicked, the page flow runtime detects the action and runs the toPageB action method. This action method is coded to return a Forward object which passes the parameter "success". (Notice that this name "success" matches the name on the corresponding action arrow in Flow View.)</p>
+
+<p>Look at the two @Jpf annotations that appear on the lines above this action method. These annotations are enclosed in Javadoc comments. The @JpfAction tag indicates that the toPageB method is an action method. The @JpfForward tag describes the behavior of that method.</p>
+
+<p>Putting it all together, a Forward object is returned by an action method. The Forward object passes the string "success", indicating that it should behave according to the directions encoded in the annotation @JpfForward name="success". That annotation's path attribute has the value "page_B.jsp", which causes the page flow controller to load page_B.jsp into the browser.</p>
+
+<p>The following diagram summarizes the flow in the example:</p>
+
+
+
+<p>To change the navigation target of this action method, simply change the value of the path attribute. For example, if you want this action method to navigate to page_C.jsp, you would make the following change to the controller file (no change to the JSP page is necessary).
+
+
+
+@JpfAction(forwards = {
+   @JpfForward(name="success", path="page_C.jsp")
+ })
+
+    public Forward toPageB()
+    {
+        return new Forward( "success" );
+    }</p>
+
+<p>As you will see in later sections, the WebLogic Workshop IDE generates this code for you when you create a new page flow or JSP file from the graphical view. This code generation and subsequent validation of your changes saves you considerable time.</p>
+			</section>
+			<section>
+				<title>Submitting Data</title>
+<p>Suppose you want to your web application to collect data from users and then process that data in some way. The following example demonstrates how to set up a data submission process using page flows. The sample code referred to in this example can be found at: </p>
+
+<p>&lt;BEA_HOME>\weblogic90\samples\workshop\SamplesApp\WebApp\handlingData\simpleSubmit\
+</p>
+<p>Submitting data is a two step process: (1) the data submitted from a JSP page is loaded into a Form Bean instance and (2) the Form Bean instance is passed to an action method for processing.</p>
+
+
+
+<p>Form Beans are simple Java classes with fields and setter and getter methods for accessing those fields. Form Beans classes are contained within the controller file. In most cases, Form Beans are designed to accept data submitted from JSP forms. For example, if a JSP page has input elements for name, eye_color, and height, then the Form Bean will have corresponding fields for name, eye_color, and height. The following example Form Bean can be found in the controller file SimpleSubmitController.jpf. It contains one field, name, and setter and getter methods for that field.</p>
+
+<p>SimpleSubmitController.jpf
+
+    public class SimpleSubmitController extends PageFlowController
+    {
+    
+    ...
+ 
+      public static class SubmitNameForm extends FormData
+        {
+            private String name;
+    
+            public void setName(String name)
+            {
+                this.name = name;
+            }
+    
+            public String getName()
+            {
+                return this.name;
+            }
+        }
+    }</p>
+
+<p>The input elements on the JSP page are said to be "data bound" to the fields in the Form Bean. Data binding allows the the data submitted from the JSP page to be loaded into the Form Bean instance. For example, the input element on index.jsp contains a data binding expression that refers to the name field of the Form Bean: {actionForm.name}. The expression "actionForm" refers to the Form Bean SubmitNameForm, the property ".name" refers to the name field of the Form Bean. For detailed information about data binding see Using Data Binding in Page Flows.</p>
+
+<p>index.jsp</p>
+
+<p>        &lt;netui:form action="SubmitName">
+            Name: &lt;netui:textBox dataSource="{actionForm.name}"/>
+            ....        
+        &lt;/netui:form></p>
+
+<p>Finally the Form Bean instance (carrying the submitted data) is passed to the action method for processing.</p>
+
+
+
+<p>@JpfAction(forwards = {
+   @JpfForward(name="success", path="showName.jsp")
+ })
+
+    protected Forward SubmitName(SubmitNameForm form)
+    {
+        //
+        // The data is processed here
+        //
+
+        return new Forward("success");
+    }</p>
+
+<p>The submitted data can be accessed by calling the getter methods on the Form Bean.</p>
+
+<p>@JpfAction(forwards = {
+   @JpfForward(name="success", path="showName.jsp")
+ })
+    protected Forward SubmitName(SubmitNameForm form)
+    {
+        if( form.getName() != null )
+			// do something here
+        else 
+            // do something else here
+
+        return new Forward("success");
+    }</p>
+
+<p>By default the Form Bean instance that is passed to the action method exists only as long as the HTTP request. This is called a "request-scoped Form Bean". When the HTTP request is destroyed, the Form Bean instance, along with the user submitted data, is destroyed. As an alternative, you can use a Page Flow-scoped Form Bean, which has a longer life cycle. For details see Form Bean Scopings.</p>
+				
+			</section>
+			<section>
+				<title>Displaying Data</title>
+<p>Suppose that once you have collected data, you want to display it back to the user. The following example shows how to use data binding to display data to the user. The sample code referred to can be found at: </p>
+
+<p>&lt;BEA_HOME>\weblogic81\samples\workshop\SamplesApp\WebApp\handlingData\simpleSubmit\</p>
+
+<p>Displaying data using data binding requires that (1) the data is located somewhere where it can accessed by the JSP page and (2) the JSP page uses a data binding expression to retrieve the data from that location.</p>
+
+
+
+<p>Notice the syntax of data binding expression on the JSP page. (1) It is framed by curley braces, (2) it begins with a data binding context, in this case the request context, and (3) the context is followed by an attribute, in this case "name".</p>
+
+<p>In the following example, an action method places data on the name attribute of the request object.</p>
+
+<p>SimpleSubmitController.jpf
+
+
+@JpfAction(forwards = {
+   @JpfForward(name="success", path="showName.jsp")
+ })
+
+    protected Forward SubmitName(SubmitNameForm form)
+    {
+        getRequest().setAttribute("name", form.getName());
+        return new Forward("success");
+    }</p>
+
+<p>After the data has been located on the name attribute of the request object, it is displayed on a JSP page using a data binding expression.</p>
+
+<p>showName.jsp</p>
+
+<p>    Here is the data you submitted: &lt;netui:label value="{request.name}" /></p>
+
+<p>Note that the request object has a relatively short life-cycle. When the user makes a new request, by navigating to a new JSP page or invoking another action method, the current request object is destroyed along with the data it contains. If your application requires the data to be more persistent, then you could use a different data binding context, for example the session object or a Page Flow-scoped Form Bean, which both have longer life-cycles. For detailed information about the different data binding contexts available, see Using Data Binding in Page Flows.				</p>
+			</section>
+			<section>
+				<title>Connecting to Resources with Controls</title>
+				<p>[tbd]</p>
+			</section>
+		</section>
+	</body>
+	<footer>
+		<legal>Java, J2EE, and JCP are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.<br/>
+	&copy; 2004, Apache Software Foundation
+	</legal>
+	</footer>
+</document>

Added: incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml	Fri Oct  8 16:12:22 2004
@@ -0,0 +1,522 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
+<document>
+	<header>
+		<title>Beehive Page Flow Tutorial</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction To the Page Flow Tutorial</title>
+			<section>
+				<title>Tutorial Goals</title>
+				<p>In this tutorial, you will learn:</p>
+				<ul>
+					<li>How to create a basic Page Flow web application</li>
+					<li>How to coordinate user navigation with Forward methods</li>
+					<li>How to handle data submission and processing with data binding and Form Beans</li>
+					<li>How to create a user interface with the &lt;neuti> JSP tag library</li>
+					<li>How Page Flows help to separate data processing and data presentation</li>
+				</ul>
+			</section>
+			<section>
+				<title>Note on the Current State of the Page Flow Tutorial</title>
+				<p>This tutorial is currently a work in progress.  Unfinished portions of the tutorial are marked [tbd], standing for "to be done".  Also the tutorial assumes that you are using a Windows machine, however, with a little common sense it is very easy to run through the tutorial on a Linux machine.  For example, where the tutorial tells you to run FOO.cmd, instead run FOO.sh.</p>
+				<p>Please send any comments to  Steve Hanson, at <code>steveh@bea.com</code>.</p>
+				</section>
+		</section>
+		<section id="step1">
+			<title>Step 1: Begin the Page Flow Tutorial</title>
+			<section>
+				<title/>
+			</section>
+			<section>
+				<title>Download and Install JDK5</title>
+				<p>If you do not have JDK5 installed on your machine, visit <fork href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</fork> and download the latest version of JDK5.</p>
+				<p>Throughout this tutorial, it is assumed that you have JDK 5 installed at <code>C:\jdk1.5.0</code></p>
+				<p>[tbd: more detailed installation instructions]</p>
+			</section>
+			<section>
+				<title>Download and Install SVN (Subversion Source Control)</title>
+				<p>Visit <fork href="http://subversion.tigris.org">http://subversion.tigris.org</fork> and install the SVN source control system.</p>
+				<p>[tbd: more detailed installation instructions]</p>
+			</section>
+			<section>
+				<title>Download and Install Beehive</title>
+				<p>
+					Create a directory called <code>beehive-src</code> on your C: drive.  Confirm that the the following directory structure exists: <code>C:/beehive-src</code>.  This directory will store the Beehive source and all of your Beehive projects.					</p>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>cd beehive-src</code>
+				</p>
+				<p>At the command prompt, enter: <code>svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</code>
+				</p>
+				<p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p>
+				<p>At the command prompt, enter: <code>exit</code>
+				</p>
+			</section>
+			<section>
+				<title>Install ANT</title>
+				<p>Create a directory named <code>installed</code>at <code>C:/beehive-src/trunk/installed</code>.</p>
+				<p>Unzip the file <code>C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</code> into <code>C:/beehive-src/Beehive/installed</code>.</p>
+				<p>After the file has unzipped, confirm that the following directory structure exists: <code>C:/beehive-src/trunk/installed/apache-ant-1.6.2</code>.</p>
+			</section>
+			<section>
+				<title>Run the <code>bootstrap</code> Target</title>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>set BEEHIVE_HOME=C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter:  <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant bootstrap</code>
+				</p>
+				<p>At the command prompt, enter: <code>exit</code>
+				</p>
+			</section>
+		</section>
+		<section id="step_2">
+			<title>Step 2: Create a New Page Flow Application</title>
+			<section>
+				<title>Introduction</title>
+				<p>
+				In this step you will create a Controller file and a JSP page. A Controller file is a Java class (with the JPF file extension) that controls how your web application functions and what it does. The methods in the Controller file determines all of the 				major features of a web application:	how users navigate from page to page, how user requests are handled, and how the web application accesses back-end resources.
+				</p>
+				<p>	
+				Controller files control the features of a web application through the use of Action methods. An Action method may do something simple, such as forward a user from one JSP page to another; or it may do something complex, such as 				receive 	user input from a JSP page, calculate and/or retrieve other data based on the user input, and forward the user to a JSP page where the results are displayed.
+				</p>
+				<p>
+				The Controller file you create in this step contains one simple Action method. This simple navigational Action method forwards users to the index.jsp page. In the next step, you will create a more complex Action method.
+				</p>
+			</section>
+			<section>
+				<title>To Create a Controller File</title>
+				<p>In this step you will create the Controller file in place in the Tomcat deployment directory.</p>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps</code>, create a directory called <code>pageflow_tutorial</code>.</p>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</code>, create a file called <code>Controller.jpf</code>.</p>
+				<p>In a text editor (or your IDE of choice), open the file Controller.jpf.</p>
+				<p>Edit Controller.jpf so it appears as follows.</p>
+				<source><![CDATA[
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+	 
+@Jpf.Controller
+public class Controller extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(name="success", path="index.jsp")
+        }
+    )
+    protected Forward begin()
+    {
+        return new Forward("success");
+    }
+}
+				]]></source>
+			</section>
+			<section>
+				<title>To Create a JSP File</title>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</code>, create a file named <code>index.jsp</code>.</p>
+				<p>Edit index.jsp so it looks like the following.</p>
+				<source><![CDATA[ 			
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>index.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+    <p>
+      index.jsp
+    </p>
+  </netui:body>
+</netui:html>
+			]]></source>
+			</section>
+			<section>
+				<title>To Create the WEB_INF directory</title>
+				<p>	Open a command shell.</p>
+				<p>At the command prompt, enter:  <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\netui\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/pageflow_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+			</section>
+		</section>
+		<section id="step_3">
+			<title>Step 3: Navigation</title>
+			<section>
+				<title>Create a Destination JSP Page</title>
+				<p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</code>, create a file named <code>page2.jsp</code>.</p>
+				<p>Edit page2.jsp so it looks like the following.</p>
+				<source><![CDATA[					
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>page2.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+    <p>
+      Welcome to page2.jsp!
+    </p>
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>Create a Link to the Destination Page</title>
+				<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/index.jsp.</p>
+				<p>Edit index.jsp so it appears as follows.</p>
+				<source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>index.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+    <p>
+      index.jsp
+    </p>
+    <p>
+      <netui:anchor action="toPage2">Link to page2.jsp</netui:anchor>
+    </p>
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>Add an Action Method to Handle the Link</title>
+				<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf.</p>
+				<p>Edit Controller.jpf so it appears as follows.</p>
+				<source><![CDATA[
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+ 
+public class Controller 
+    extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="index.jsp")
+        }
+    )
+    protected Forward begin()
+    {
+        return new Forward("success");
+    }
+
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="page2.jsp")
+        }
+    )
+    public Forward toPage2()
+    {
+        return new Forward("success");
+    }
+}
+				]]></source>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/pageflow_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+				<p>Click the link.</p>
+				<p>You will be directed to page2.jsp.</p>
+			</section>
+			<section>
+				<title>Shutdown Tomcat Server</title>
+				<p>At the command prompt, enter: <code>shutdown.bat</code>
+				</p>
+			</section>
+		</section>
+		<section id="step_4">
+			<title>Step 4: Submitting Data</title>
+			<section>
+				<title>To Create a Submission Form</title>
+				<p>Edit the file <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/page2.jsp</code> so it appears as follows.</p>
+				<source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>page2.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+    <p>
+      Welcome to page2.jsp!
+    </p>
+    <p>
+      <netui:form action="processData">
+        <p>Name:<netui:textBox dataSource="actionForm.name"/>
+        <p>Age:<netui:textBox dataSource="actionForm.age"/>
+       <p><netui:button type="submit">Submit</netui:button>
+      </netui:form>
+    </p>	
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>To Edit the Controller File to Handle the Submitted Data</title>
+				<p>Open the file <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf</code>
+				</p>
+				<p>Edit Controller.jpf so it appears as follows.</p>
+				<source><![CDATA[
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.netui.pageflow.FormData;
+ 
+@Jpf.Controller
+public class Controller extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="index.jsp")
+        }
+    )
+    public Forward begin()
+    {
+        return new Forward("success");
+    }
+
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="success", path="page2.jsp")
+        }
+    )
+    public Forward toPage2()
+    {
+        return new Forward("success");
+    }
+
+    @Jpf.Action(
+        forwards = { 
+            @Jpf.Forward(name = "success", path = "showData.jsp")
+        }
+    )
+    public Forward processData(ProcessDataForm form)
+    {
+	    System.out.println("Name: " + form.name);
+	    System.out.println("Age: " + form.age);
+        return new Forward("success");
+    }
+
+    public static class ProcessDataForm extends FormData
+    {
+        private int age;
+        private String name;
+
+        public void setName(String name)
+        {
+            this.name = name;
+        }
+
+        public String getName()
+        {
+            return this.name;
+        }
+
+        public void setAge(int age)
+        {
+            this.age = age;
+        }
+
+        public int getAge()
+        {
+            return this.age;
+        }
+    }
+}
+				]]></source>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/pageflow_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+				<p>Click the link.</p>
+				<p>You will be directed to page2.jsp.</p>
+			</section>
+			<section>
+				<title>Shutdown Tomcat Server</title>
+				<p>At the command prompt, enter: <code>shutdown.bat</code>
+				</p>
+			</section>
+		</section>
+		<section id="step_5">
+			<title>Step 5: Processing and Displaying Data</title>
+			<section>
+				<title>To Process the Submitted Data</title>
+				<p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p>
+				<source><![CDATA[
+@Jpf.Action(
+	forwards = { 
+		@Jpf.Forward( name = "success", path = "showData.jsp" )
+	}
+)
+public Forward processData( ProcessDataForm form )
+{
+	System.out.println("Name: " + form.name);
+	System.out.println("Age: " + form.age);
+	getRequest().setAttribute("data", form);
+	return new Forward("success");
+}
+				]]></source>
+			</section>
+			<section>
+				<title>To Create a JSP Page to Display Submitted Data</title>
+				<p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/pageflow_tutorial. Edit showData.jsp so it appears as follows.</p>
+				<source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<netui:html>
+  <head>
+    <title>showData.jsp</title>
+    <netui:base/>
+  </head>
+  <netui:body>
+      <p>Name:<netui:span value="${requestScope.data.name}"/>
+      <p>Age:<netui:span value="${requestScope.data.age}"/>
+  </netui:body>
+</netui:html>
+				]]></source>
+			</section>
+			<section>
+				<title>Compile the Page Flow</title>
+				<p>Open a command shell.</p>
+				<p>At the command prompt, enter: <code>set JAVA_HOME=C:\jdk1.5.0</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk</code>
+				</p>
+				<p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
+				</p>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
+				</p>
+				<p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</code>
+				</p>
+			</section>
+			<section>
+				<title>To Start the Tomcat Server</title>
+				<p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+				</p>
+				<p>At the command prompt, enter: <code>startup.bat</code>
+				</p>
+				<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
+			</section>
+			<section>
+				<title>To Test the Page Flow Web Application</title>
+				<p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/pageflow_tutorial</code>
+				</p>
+				<p>You will be directed to the index.jsp page.</p>
+				<p>Click the link.</p>
+				<p>You will be directed to page2.jsp.</p>
+			</section>
+			<section>
+				<title>Shutdown Tomcat Server</title>
+				<p>At the command prompt, enter: <code>shutdown.bat</code>
+				</p>
+			</section>
+		</section>
+		<section id="summary">
+			<title>Summary: Page Flow Tutorial</title>
+			<p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p>
+			<p>Concepts and Tasks Introduced in This Tutorial</p>
+			<p>[tbd: more detailed summary]</p>
+		</section>
+	</body>
+	<footer>
+		<legal>Java, J2EE, and JCP are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.<br/>
+	&copy; 2004, Apache Software Foundation
+	</legal>
+	</footer>
+</document>

Added: incubator/beehive/trunk/site/src/documentation/content/xdocs/reference.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/reference.xml	Fri Oct  8 16:12:22 2004
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
+<document>
+	<header>
+		<title>Beehive Reference Documentation</title>
+	</header>
+	<body>
+		<ul>
+			<li><fork href="reference/taglib/index.html">Page Flow &lt;netui> Tag Reference</fork></li>
+			<!--<li><fork href="reference/taglib/index.html">Page Flow Annotations Reference</fork></li>-->
+			<li><fork href="/reference/classref_pageflows/index.html">Page Flow API Reference</fork></li>
+			<!--<li><fork href="/reference/classref_controls/index.html">Controls Annotations Reference</fork></li>-->
+			<li><fork href="/reference/classref_controls/index.html">Controls API Reference</fork></li>
+			<!--<li><fork href="/reference/classref_wsm/index.html">Web Services Metadata Annotations Reference</fork></li>-->
+			<li><fork href="/reference/classref_wsm/index.html">Web Services Metadata API Reference</fork></li>
+		</ul>
+	</body>
+	<footer>
+		<legal>Java, J2EE, and JCP are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.<br/>
+	&copy; 2004, Apache Software Foundation
+	</legal>
+	</footer>
+</document>

Modified: incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml
==============================================================================
--- incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml	(original)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml	Fri Oct  8 16:12:22 2004
@@ -1,24 +1,27 @@
 <?xml version="1.0"?>
 <site label="Beehive" href="" xmlns="http://apache.org/forrest/linkmap/1.0">
-
-  <about label="Beehive">
-    <index label="Welcome" href="index.html" />
-    <license label="License" href="license.html" />
-    <downloads label="Downloads" href="downloads.html" />
-  </about>
-
-  <documentation label="Documentation">
-    <faq label="FAQ" href="faq.html" />
-    <controlprogramming label="Controls" href="Controls.html" />
-    <jsr181 label="Web Services (JSR 181)" href="webservices.html" />
-  </documentation>
-
-  <community label="Community">
-    <mailinglists label="Mailing Lists" href="mailinglists.html" />
-    <contributors label="Contributors" href="contributors.html" />
-  </community>
-
-  <external-refs>
-    <xml.apache.org href="http://xml.apache.org/" />
-  </external-refs>
+	<about label="Beehive">
+		<index label="Welcome" href="index.html"/>
+		<license label="License" href="license.html"/>
+		<downloads label="Downloads" href="downloads.html"/>
+		<faq label="FAQ" href="faq.html"/>
+	</about>
+	<documentation label="Documentation">
+		<pageflow label="Page Flows" href="/pageflow">
+			<tutorial_pageflow label="Page Flow Tutorial" href="/tutorial_pageflow.html"/>
+		</pageflow>
+		<controls label="Controls">
+			<!--<tutorial_control label="Control Tutorial" href="/controls/tutorial_controls.html"/>-->
+			<control_overview label="Control Programming" href="Controls.html"/>
+		</controls>
+		<jsr181 label="Web Services (JSR 181)" href="webservices.html"/>
+		<ref label="Reference Docs" href="reference.html"/>
+	</documentation>
+	<community label="Community">
+		<mailinglists label="Mailing Lists" href="mailinglists.html"/>
+		<contributors label="Contributors" href="contributors.html"/>
+	</community>
+	<external-refs>
+		<xml.apache.org href="http://xml.apache.org/"/>
+	</external-refs>
 </site>