Author: steveh
Date: Wed Nov 10 15:04:32 2004
New Revision: 57396

Added:
   incubator/beehive/site/build/site/pageflow/images/
   incubator/beehive/site/build/site/pageflow/images/impl-flow-1.png   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/images/impl-flow-2.png   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/images/logical-flow-1.png   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/images/logical-flow-2.png   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/pageflow_altering.html   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/pageflow_building.html   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/pageflow_controllers.html   
(contents, props changed)
   incubator/beehive/site/build/site/pageflow/pageflow_jsp.html   (contents, 
props changed)
   incubator/beehive/site/build/site/pageflow/pageflow_overview.html   
(contents, props changed)
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_altering.xml
   (contents, props changed)
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
   (contents, props changed)
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
   (contents, props changed)
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
   (contents, props changed)
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
   (contents, props changed)
Modified:
   incubator/beehive/site/build/site/Controls.html
   incubator/beehive/site/build/site/contributors.html
   incubator/beehive/site/build/site/controls/sample_controls-blank.html
   incubator/beehive/site/build/site/controls/sample_controls-db.html
   incubator/beehive/site/build/site/controls/tutorial_controls.html
   incubator/beehive/site/build/site/downloads.html
   incubator/beehive/site/build/site/faq.html
   incubator/beehive/site/build/site/index.html
   incubator/beehive/site/build/site/jpetstore.html
   incubator/beehive/site/build/site/license.html
   incubator/beehive/site/build/site/mailinglists.html
   incubator/beehive/site/build/site/pageflow/guide.html
   incubator/beehive/site/build/site/pageflow/sample_netui-blank.html
   incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html
   incubator/beehive/site/build/site/reference.html
   incubator/beehive/site/build/site/webservices.html
   incubator/beehive/site/build/site/wsm/sample_AddressBook.html
   incubator/beehive/site/build/site/wsm/sample_Dashboard.html
   incubator/beehive/site/build/site/wsm/sample_wsm-blank.html
   incubator/beehive/site/build/site/wsm/tutorial_wsm.html
Log:
Adding Bob McWhirter's contribution to the page flow docs.

Modified: incubator/beehive/site/build/site/Controls.html
==============================================================================
--- incubator/beehive/site/build/site/Controls.html     (original)
+++ incubator/beehive/site/build/site/Controls.html     Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/contributors.html
==============================================================================
--- incubator/beehive/site/build/site/contributors.html (original)
+++ incubator/beehive/site/build/site/contributors.html Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/controls/sample_controls-blank.html
==============================================================================
--- incubator/beehive/site/build/site/controls/sample_controls-blank.html       
(original)
+++ incubator/beehive/site/build/site/controls/sample_controls-blank.html       
Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/controls/sample_controls-db.html
==============================================================================
--- incubator/beehive/site/build/site/controls/sample_controls-db.html  
(original)
+++ incubator/beehive/site/build/site/controls/sample_controls-db.html  Wed Nov 
10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/controls/tutorial_controls.html
==============================================================================
--- incubator/beehive/site/build/site/controls/tutorial_controls.html   
(original)
+++ incubator/beehive/site/build/site/controls/tutorial_controls.html   Wed Nov 
10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/downloads.html
==============================================================================
--- incubator/beehive/site/build/site/downloads.html    (original)
+++ incubator/beehive/site/build/site/downloads.html    Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/faq.html
==============================================================================
--- incubator/beehive/site/build/site/faq.html  (original)
+++ incubator/beehive/site/build/site/faq.html  Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/index.html
==============================================================================
--- incubator/beehive/site/build/site/index.html        (original)
+++ incubator/beehive/site/build/site/index.html        Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             
@@ -280,20 +300,20 @@
 <a href="#Get+Involved">Get Involved</a>
 </li>
 </ul>
-    <!--
-    Beehive
-        Welcome<should link to the HTML page created from Welcome.doc>
-        License<should link to http://www.apache.org/licenses/LICENSE-2.0>
-
-    Documentation
-        FAQ<should link to the HTML page created from FAQ.doc>
-        Controls Overview<should link to Kyle's control Overview>
-        Controls Programming<should link to Kyle's Controls programming pdf>
-        Web Services (JSR 181)<should link to 
http://jcp.org/en/jsr/detail?id=181>
-
-    Contributing
-        Mailing Lists<should link to HTML Page created from MailingLists.doc>
-        Contributers<should link to HTML Page created from Contributers.doc>
+    <!--
+    Beehive
+        Welcome<should link to the HTML page created from Welcome.doc>
+        License<should link to http://www.apache.org/licenses/LICENSE-2.0>
+
+    Documentation
+        FAQ<should link to the HTML page created from FAQ.doc>
+        Controls Overview<should link to Kyle's control Overview>
+        Controls Programming<should link to Kyle's Controls programming pdf>
+        Web Services (JSR 181)<should link to 
http://jcp.org/en/jsr/detail?id=181>
+
+    Contributing
+        Mailing Lists<should link to HTML Page created from MailingLists.doc>
+        Contributers<should link to HTML Page created from Contributers.doc>
     -->
     
     

Modified: incubator/beehive/site/build/site/jpetstore.html
==============================================================================
--- incubator/beehive/site/build/site/jpetstore.html    (original)
+++ incubator/beehive/site/build/site/jpetstore.html    Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/license.html
==============================================================================
--- incubator/beehive/site/build/site/license.html      (original)
+++ incubator/beehive/site/build/site/license.html      Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/mailinglists.html
==============================================================================
--- incubator/beehive/site/build/site/mailinglists.html (original)
+++ incubator/beehive/site/build/site/mailinglists.html Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/pageflow/guide.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/guide.html       (original)
+++ incubator/beehive/site/build/site/pageflow/guide.html       Wed Nov 10 
15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Added: incubator/beehive/site/build/site/pageflow/images/impl-flow-1.png
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/site/build/site/pageflow/images/impl-flow-2.png
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/site/build/site/pageflow/images/logical-flow-1.png
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/site/build/site/pageflow/images/logical-flow-2.png
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/site/build/site/pageflow/pageflow_altering.html
==============================================================================
--- (empty file)
+++ incubator/beehive/site/build/site/pageflow/pageflow_altering.html   Wed Nov 
10 15:04:32 2004
@@ -0,0 +1,521 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Altering a Page Flow</title>
+<link type="text/css" href="../skin/page.css" rel="stylesheet">
+</head>
+<body text="#000000" bgcolor="#FFFFFF">
+<!--================= start Navigation Path ==================-->
+<table summary="navigation path" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img 
height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font 
size="2" face="Arial, Helvetica, Sans-serif"><script 
src="../skin/breadcrumbs.js" language="JavaScript" 
type="text/javascript"></script></font></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Navigation Path ==================-->
+<!--================= start Banner ==================-->
+<table summary="header with logos" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<!--================= start Group Logo ==================-->
+<td bgcolor="#294563"><a href="http://incubator.apache.org/";><img border="0" 
class="logoImage" alt="Apache Incubator" 
src="../images/_incubator-logo.gif"></a></td>
+<!--================= end Group Logo ==================-->
+<!--================= start Project Logo ==================--><td width="100%" 
align="center" bgcolor="#294563"><a 
href="http://incubator.apache.org/beehive";><img border="0" class="logoImage" 
alt="Apache Beehive" src="../images/_beehive_logo_wide.gif"></a></td>
+<!--================= end Project Logo ==================-->
+<!--================= start Search ==================--><td valign="top" 
rowspan="2" bgcolor="#294563">
+<form target="_blank" action="http://www.google.com/search"; method="get">
+<table summary="search" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#4C6C8F">
+<tr>
+<td colspan="3"><img height="10" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" 
class="spacer"></td><td nowrap="nowrap"><input value="incubator.apache.org" 
name="sitesearch" type="hidden"><input size="15" name="q" id="query" 
type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><input name="Search" value="Search" type="submit">
+<br>
+<font face="Arial, Helvetica, Sans-serif" size="2" color="white">
+                      the Apache Beehive site
+                      
+                      
+                    </font></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img alt="" border="0" height="10" width="9" 
src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" 
height="10" width="9" src="../skin/images/search-right.gif"></td>
+</tr>
+</table>
+</form>
+</td>
+<!--================= start Search ==================--><td 
bgcolor="#294563"><img height="10" width="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" bgcolor="#294563" colspan="2">
+<!--================= start Tabs ==================-->
+<div class="tab">
+<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td width="6"><img alt="" height="8" width="6" 
src="../skin/images/spacer.gif"></td><td valign="bottom">
+<table summary="selected tab" style="height: 1.8em" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-left.gif"></td><td valign="middle" 
bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, 
Sans-serif"><b><a class="base-selected" 
href="../index.html">Home</a></b></font></td><td valign="top" width="5" 
bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-right.gif"></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<!--================= end Tabs ==================-->
+</td><td bgcolor="#294563"><img alt="" width="1" height="1" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Banner ==================-->
+<!--================= start Menu, NavBar, Content ==================-->
+<table summary="page content" bgcolor="#ffffff" width="100%" border="0" 
cellpadding="0" cellspacing="0">
+<tr>
+<td valign="top">
+<table summary="menu" border="0" cellspacing="0" cellpadding="0">
+<tr>
+<!--================= start left top NavBar ==================-->
+<td rowspan="3" valign="top">
+<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, 
Sans-serif">&nbsp;</font></td>
+</tr>
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td>
+<!--================= end left top NavBar ==================--><td 
bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" 
bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" 
valign="top" bgcolor="#4C6C8F">
+<!--================= start Menu items ==================-->
+<div class="menu">
+<ul>
+<li>
+<font color="#CFDCED">Beehive</font>
+<ul>
+        
+<li>
+<a href="../index.html">Welcome</a>
+</li>
+        
+<li>
+<a href="../license.html">License</a>
+</li>
+        
+<li>
+<a href="../downloads.html">Downloads</a>
+</li>
+        
+<li>
+<a href="../faq.html">FAQ</a>
+</li>
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Documentation</font>
+<ul>
+        
+        
+<li>
+<font color="#CFDCED">Page Flows</font>
+<ul>
+            
+<li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<span class="sel"><font color="#ffcc00">Altering a Page Flow</font></span>
+</li>        
+            
+<li>
+<a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
+</li>
+            
+<li>
+<a href="../pageflow/guide.html">Page Flow Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Controls</font>
+<ul>
+            
+<li>
+<a href="../controls/tutorial_controls.html">Control Tutorial</a>
+</li>
+            
+<li>
+<a href="../Controls.html">Control Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Web Services</font>
+<ul>
+            
+<li>
+<a href="../wsm/tutorial_wsm.html">Web Services Tutorial</a>
+</li>
+            
+<li>
+<a href="../webservices.html">Web Services (JSR 181)</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Samples</font>
+<ul>
+            
+<li>
+<a href="../jpetstore.html">Petstore</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_Dashboard.html">Petstore Dashboard</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_AddressBook.html">AddressBook/Employee</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-db.html">Database Control</a>
+</li>
+            
+<li>
+<a href="../pageflow/sample_netui-blank.html">Page Flow Project</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-blank.html">Control Project</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_wsm-blank.html">Web Service Project</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<a href="../reference.html">Reference Docs</a>
+</li>
+        
+        
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Community</font>
+<ul>
+        
+<li>
+<a href="../mailinglists.html">Mailing Lists</a>
+</li>
+        
+<li>
+<a href="../contributors.html">Contributors</a>
+</li>
+    
+</ul>
+</li>
+</ul>
+</div>
+<!--================= end Menu items ==================-->
+</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img 
width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" align="left" colspan="2" rowspan="2" 
bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" 
src="../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" 
width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td 
valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img 
height="10" width="10" border="0" alt="" 
src="../skin/images/menu-right.gif"></td>
+</tr>
+<tr>
+<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td><td valign="top" width="100%">
+<table summary="content" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<!--================= start middle NavBar ==================-->
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" 
alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="left" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td align="right" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td width="10" 
bgcolor="#CFDCED"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end middle NavBar ==================-->
+<!--================= start Content==================-->
+<tr>
+<td align="left" width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" 
align="left" width="100%">
+<div class="content">
+<table class="title" summary="">
+<tr>
+<td valign="middle">
+<h1>Altering a Page Flow</h1>
+</td>
+</tr>
+</table>
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#logical_flow_change">Logical Flow Change</a>
+</li>
+<li>
+<a href="#impl_flow_change">Implementation Flow Change</a>
+</li>
+<li>
+<a href="#changes_to_jsp">Changes Required in the JSPs</a>
+</li>
+<li>
+<a href="#changes_to_controller">Changes Required in the Controller Class</a>
+<ul class="minitoc">
+<li>
+<a href="#redirecting_login">Redirect login()</a>
+</li>
+</ul>
+</li>
+</ul>
+
+  
+<a name="N1000C"></a><a name="introduction"></a>
+<h3>Introduction</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    In the previous pages, you were shown how to stitch together a controller 
class
+    and a set of JSP pages.  One of the most powerful features of the Beehive 
way
+    of building applications is being able to change the flow by editing only 
the
+    controller class file, without having to touch the JSP pages.
+    </p>
+</div>
+
+  
+<a name="N10016"></a><a name="logical_flow_change"></a>
+<h3>Logical Flow Change</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Sometime after deploying the application, it is decided that before 
allowing a
+    user to login, they must first be presented a page describing the terms of 
+    service for using the application.  Additionally, a decision is made to 
have
+    the "Sign Up" action automatically log-in the new user so they don't have
+    to traverse the login screen.
+    </p>
+<p>
+    The original logical flow looked like this:
+    </p>
+<p>
+      
+<img alt="logical flow, before alteration" src="images/logical-flow-1.png">
+    </p>
+<p>
+    After these changes, the logical flow now resembles:
+    </p>
+<p>
+      
+<img alt="logical flow, after alteration" src="images/logical-flow-2.png">
+    </p>
+</div>
+
+  
+<a name="N10034"></a><a name="impl_flow_change"></a>
+<h3>Implementation Flow Change</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    To accomodate the new logical flow, the implementation flow model 
originally looked like this:
+    </p>
+<p>
+      
+<img alt="logical flow, after alteration" src="images/impl-flow-1.png">
+    </p>
+<p>
+    After removing <span class="codefrag">thanks.jsp</span>, adding <span 
class="codefrag">terms.jsp</span>, adding an
+    <span class="codefrag">acceptTerms()</span> method, and re-routing the 
post-signup flow, looks like:
+    </p>
+<p>
+      
+<img alt="logical flow, after alteration" src="images/impl-flow-2.png">
+    </p>
+</div>
+
+  
+<a name="N10058"></a><a name="changes_to_jsp"></a>
+<h3>Changes Required in the JSPs</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Strictly speaking, no changes to JSP content are required.  Only deletion 
of the 
+    unused <span class="codefrag">thanks.jsp</span> and creation of the <span 
class="codefrag">terms.jsp</span> is
+    all that is required. 
+    </p>
+<p>
+    
+<strong>Note:</strong>, The <span class="codefrag">signup.jsp</span> page
+    that previously would direct a user to <span 
class="codefrag">thanks.jsp</span> but will now
+    send him to <span class="codefrag">mypage.jsp</span> requires 
<em>absolutely no changes</em>.
+    </p>
+<p>
+    The <span class="codefrag">terms.jsp</span> page would include a link 
through a new <span class="codefrag">acceptTerms()</span>
+    controller method, similar to:
+    </p>
+<pre class="code">
+  &lt;netui:anchor action="acceptTerms"&gt;Accept these Terms of 
Service&lt;/netui:anchor&gt;
+</pre>
+</div>
+
+  
+<a name="N10088"></a><a name="changes_to_controller"></a>
+<h3>Changes Required in the Controller Class</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    To change the flow, a few simple edits of the controller class are all 
that is required.
+    </p>
+<a name="N10091"></a><a name="redirecting_login"></a>
+<h4>Redirect login()</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      Previous, the <span class="codefrag">login()</span> controller method 
was defined to statically
+      return the forward to <span class="codefrag">login.jsp</span>.  
+      </p>
+<pre class="code">
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="<strong>login.jsp</strong>" );
+        }
+    )
+    public Forward login()
+    {
+        return new Forward( "success" );
+    }
+</pre>
+<p>
+      By changing the <span class="codefrag">path</span> property of the <span 
class="codefrag">Jpf.Forward</span> associated
+      with this page, all links that previously took the user to <span 
class="codefrag">login.jsp</span> will
+      now direct him to <span class="codefrag">terms.jsp</span>.
+      </p>
+<pre class="code">
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="<strong>terms.jsp</strong>" );
+        }
+    )
+    public Forward login()
+    {
+        return new Forward( "success" );
+    }
+</pre>
+<p>
+      The <span class="codefrag">terms.jsp</span> page links through a new 
<span class="codefrag">acceptTerms()</span> 
+      controller method which simply is a static forward to <span 
class="codefrag">login.jsp</span>.      
+      </p>
+<pre class="code">
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="login.jsp" );
+        }
+    )
+    public Forward acceptTerms()
+    {
+        return new Forward( "success" );
+    }
+</pre>
+<p>
+      This biggest change in the controller class is in the <span 
class="codefrag">processSignUp()</span>
+      controller method.  Instead of just recording the user's information, it 
now must
+      also perform the logic of logging in the user automatically.  
Additionally, the
+      forward returned by it will send the user directly to <span 
class="codefrag">mypage.jsp</span>
+      instead of the not-unused <span class="codefrag">thanks.jsp</span> page.
+      </p>
+<pre class="code">
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="<strong>mypage.jsp</strong>" );
+        }
+    )
+    public Forward processSignUp(SignUpForm form)
+    {
+        // record the user's sign-up information.
+
+        ... 
+        ... 
+
+        // perform automatic login for the user.
+
+        HttpServletRequest request = getRequest();
+        HttpSession        session = request.getSession();
+
+        session.setAttribute( "authenticated_user",
+                              form.getUsername() );
+
+        return new Forward( "success" );
+    }
+</pre>
+<p>
+      The flow has successfully be altered to now include a jump through the 
site's
+      terms-of-service and automatically logging-in newly signed-up users.
+      </p>
+</div>
+</div>
+
+
+
+
+  
+<div class="attribution"></div>
+</div>
+</td><td width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end Content==================-->
+</table>
+</td>
+</tr>
+</table>
+<!--================= end Menu, NavBar, Content ==================-->
+<!--================= start Footer ==================-->
+<table summary="footer" cellspacing="0" cellpadding="0" width="100%" 
border="0">
+<tr>
+<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"><a 
href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a 
href="../skin/images/chapter.gif"></a><a 
href="../skin/images/chapter_open.gif"></a><a 
href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
+</tr>
+<tr>
+<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font 
size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
+          2004&nbsp;The Apache Software Foundation. All rights 
reserved.<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+            //  --></script></font></td>
+</tr>
+<tr>
+<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
+</tr>
+</table>
+<!--================= end Footer ==================-->
+</body>
+</html>

Added: incubator/beehive/site/build/site/pageflow/pageflow_building.html
==============================================================================
--- (empty file)
+++ incubator/beehive/site/build/site/pageflow/pageflow_building.html   Wed Nov 
10 15:04:32 2004
@@ -0,0 +1,785 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Building a Page Flow Web-App</title>
+<link type="text/css" href="../skin/page.css" rel="stylesheet">
+</head>
+<body text="#000000" bgcolor="#FFFFFF">
+<!--================= start Navigation Path ==================-->
+<table summary="navigation path" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img 
height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font 
size="2" face="Arial, Helvetica, Sans-serif"><script 
src="../skin/breadcrumbs.js" language="JavaScript" 
type="text/javascript"></script></font></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Navigation Path ==================-->
+<!--================= start Banner ==================-->
+<table summary="header with logos" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<!--================= start Group Logo ==================-->
+<td bgcolor="#294563"><a href="http://incubator.apache.org/";><img border="0" 
class="logoImage" alt="Apache Incubator" 
src="../images/_incubator-logo.gif"></a></td>
+<!--================= end Group Logo ==================-->
+<!--================= start Project Logo ==================--><td width="100%" 
align="center" bgcolor="#294563"><a 
href="http://incubator.apache.org/beehive";><img border="0" class="logoImage" 
alt="Apache Beehive" src="../images/_beehive_logo_wide.gif"></a></td>
+<!--================= end Project Logo ==================-->
+<!--================= start Search ==================--><td valign="top" 
rowspan="2" bgcolor="#294563">
+<form target="_blank" action="http://www.google.com/search"; method="get">
+<table summary="search" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#4C6C8F">
+<tr>
+<td colspan="3"><img height="10" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" 
class="spacer"></td><td nowrap="nowrap"><input value="incubator.apache.org" 
name="sitesearch" type="hidden"><input size="15" name="q" id="query" 
type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><input name="Search" value="Search" type="submit">
+<br>
+<font face="Arial, Helvetica, Sans-serif" size="2" color="white">
+                      the Apache Beehive site
+                      
+                      
+                    </font></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img alt="" border="0" height="10" width="9" 
src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" 
height="10" width="9" src="../skin/images/search-right.gif"></td>
+</tr>
+</table>
+</form>
+</td>
+<!--================= start Search ==================--><td 
bgcolor="#294563"><img height="10" width="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" bgcolor="#294563" colspan="2">
+<!--================= start Tabs ==================-->
+<div class="tab">
+<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td width="6"><img alt="" height="8" width="6" 
src="../skin/images/spacer.gif"></td><td valign="bottom">
+<table summary="selected tab" style="height: 1.8em" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-left.gif"></td><td valign="middle" 
bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, 
Sans-serif"><b><a class="base-selected" 
href="../index.html">Home</a></b></font></td><td valign="top" width="5" 
bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-right.gif"></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<!--================= end Tabs ==================-->
+</td><td bgcolor="#294563"><img alt="" width="1" height="1" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Banner ==================-->
+<!--================= start Menu, NavBar, Content ==================-->
+<table summary="page content" bgcolor="#ffffff" width="100%" border="0" 
cellpadding="0" cellspacing="0">
+<tr>
+<td valign="top">
+<table summary="menu" border="0" cellspacing="0" cellpadding="0">
+<tr>
+<!--================= start left top NavBar ==================-->
+<td rowspan="3" valign="top">
+<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, 
Sans-serif">&nbsp;</font></td>
+</tr>
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td>
+<!--================= end left top NavBar ==================--><td 
bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" 
bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" 
valign="top" bgcolor="#4C6C8F">
+<!--================= start Menu items ==================-->
+<div class="menu">
+<ul>
+<li>
+<font color="#CFDCED">Beehive</font>
+<ul>
+        
+<li>
+<a href="../index.html">Welcome</a>
+</li>
+        
+<li>
+<a href="../license.html">License</a>
+</li>
+        
+<li>
+<a href="../downloads.html">Downloads</a>
+</li>
+        
+<li>
+<a href="../faq.html">FAQ</a>
+</li>
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Documentation</font>
+<ul>
+        
+        
+<li>
+<font color="#CFDCED">Page Flows</font>
+<ul>
+            
+<li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<span class="sel"><font color="#ffcc00">Building a Page Flow 
Web-App</font></span>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
+<a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
+</li>
+            
+<li>
+<a href="../pageflow/guide.html">Page Flow Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Controls</font>
+<ul>
+            
+<li>
+<a href="../controls/tutorial_controls.html">Control Tutorial</a>
+</li>
+            
+<li>
+<a href="../Controls.html">Control Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Web Services</font>
+<ul>
+            
+<li>
+<a href="../wsm/tutorial_wsm.html">Web Services Tutorial</a>
+</li>
+            
+<li>
+<a href="../webservices.html">Web Services (JSR 181)</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Samples</font>
+<ul>
+            
+<li>
+<a href="../jpetstore.html">Petstore</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_Dashboard.html">Petstore Dashboard</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_AddressBook.html">AddressBook/Employee</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-db.html">Database Control</a>
+</li>
+            
+<li>
+<a href="../pageflow/sample_netui-blank.html">Page Flow Project</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-blank.html">Control Project</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_wsm-blank.html">Web Service Project</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<a href="../reference.html">Reference Docs</a>
+</li>
+        
+        
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Community</font>
+<ul>
+        
+<li>
+<a href="../mailinglists.html">Mailing Lists</a>
+</li>
+        
+<li>
+<a href="../contributors.html">Contributors</a>
+</li>
+    
+</ul>
+</li>
+</ul>
+</div>
+<!--================= end Menu items ==================-->
+</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img 
width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" align="left" colspan="2" rowspan="2" 
bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" 
src="../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" 
width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td 
valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img 
height="10" width="10" border="0" alt="" 
src="../skin/images/menu-right.gif"></td>
+</tr>
+<tr>
+<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td><td valign="top" width="100%">
+<table summary="content" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<!--================= start middle NavBar ==================-->
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" 
alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="left" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td align="right" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td width="10" 
bgcolor="#CFDCED"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end middle NavBar ==================-->
+<!--================= start Content==================-->
+<tr>
+<td align="left" width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" 
align="left" width="100%">
+<div class="content">
+<table class="title" summary="">
+<tr>
+<td valign="middle">
+<h1>Building a Page Flow Web-App</h1>
+</td>
+</tr>
+</table>
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#source_tree_layout">Source Tree Layout</a>
+<ul class="minitoc">
+<li>
+<a href="#top_level">$WEBAPP_DIR/</a>
+</li>
+<li>
+<a href="#web-inf">$WEBAPP_DIR/WEB-INF/</a>
+</li>
+<li>
+<a href="#web-inf_src">$WEBAPP_DIR/WEB-INF/src/</a>
+</li>
+<li>
+<a href="#web-inf_lib">$WEBAPP_DIR/WEB-INF/lib/</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#running_ant">Running Ant</a>
+</li>
+<li>
+<a href="#deploying">Deploying the Web-app</a>
+</li>
+<li>
+<a href="#next">Next...</a>
+</li>
+</ul>
+
+  
+<a name="N1000C"></a><a name="introduction"></a>
+<h3>Introduction</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Now that the theory of Java Page Flows has been explained, you need to know
+    how to concretely put together a web-app that uses JPFs.  Beehive ships 
with
+    a set of Ant buildfiles to make the building of an application much easier.
+    </p>
+</div>
+
+  
+<a name="N10016"></a><a name="source_tree_layout"></a>
+<h3>Source Tree Layout</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    The layout of your project may be anywhere on your local disk.  We assume
+    that the environment variable $WEBAPP_DIR points to the top-level of your
+    application.      
+    </p>
+<ul>
+      
+<li>
+<span class="codefrag">$WEBAPP_DIR/</span>
+        
+<ul>
+          
+<li>
+<span class="codefrag">Controller.jpf</span>
+</li>
+          
+<li>
+<span class="codefrag">index.jsp</span>
+</li>
+          
+<li>
+<span class="codefrag">login.jsp</span>
+</li>
+          
+<li>
+<span class="codefrag">signup.jsp</span>
+</li>
+          
+<li>
+<span class="codefrag">mypage.jsp</span>
+</li>
+          
+<li>
+<span class="codefrag">resources/</span>
+</li>
+          
+<li>
+<span class="codefrag">WEB-INF/</span>
+            
+<ul>
+              
+<li>
+<span class="codefrag">src/</span>
+</li>
+              
+<li>
+<span class="codefrag">classes/</span>
+</li>
+              
+<li>
+<span class="codefrag">lib/</span>
+</li>
+            
+</ul>
+          
+</li>
+        
+</ul>
+      
+</li>
+    
+</ul>
+<a name="N10056"></a><a name="top_level"></a>
+<h4>$WEBAPP_DIR/</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      The top-level of the web-app, at <span 
class="codefrag">$WEBAPP_DIR</span> should contain
+      your JSP pages and a <span class="codefrag">Controller.jpf</span>.  When 
built, the
+      <span class="codefrag">Controller.jpf</span> will be compiled to <span 
class="codefrag">WEB-INF/classes/Controller.jpf</span>.
+      </p>
+</div>
+<a name="N1006D"></a><a name="web-inf"></a>
+<h4>$WEBAPP_DIR/WEB-INF/</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      The <span class="codefrag">$WEBAPP_DIR/WEB-INF/</span> directory is just 
as it is with any other servlet-based
+      application.
+      </p>
+</div>
+<a name="N1007B"></a><a name="web-inf_src"></a>
+<h4>$WEBAPP_DIR/WEB-INF/src/</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      The <span class="codefrag">$WEBAPP_DIR/WEB-INF/src/</span> directory 
contains any other application 
+      source files that need to be compiled into Java classes.  They will be 
compiled 
+      to <span class="codefrag">$WEBAPP_DIR/WEB-INF/classes/</span>.  
Additionally, any extra <span class="codefrag">.properties</span> 
+      or <span class="codefrag">.xml</span> files that need to be deployed 
with your application will be copied
+      from the <span class="codefrag">src/</span> directory to the <span 
class="codefrag">classes/</span> directory during the build.
+      </p>
+</div>
+<a name="N10098"></a><a name="web-inf_lib"></a>
+<h4>$WEBAPP_DIR/WEB-INF/lib/</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      As with any other web application, the <span 
class="codefrag">$WEBAPP_DIR/WEB-INF/lib/</span> directory
+      should contain the jars for each dependency of your application, 
including those
+      required by Beehive itself.  The jars required by Beehive are listed 
below.
+      </p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+        
+<tr>
+          
+<th colspan="1" rowspan="1">Project</th>
+          <th colspan="1" rowspan="1">Jar</th>
+          <th colspan="1" rowspan="1">Version</th>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-controls.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netui-compiler.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netui-pageflow.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netuid-scoping.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netui-tags-databinding.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netui-tags-html.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netuid-template.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-tomcat-common-4x.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-tomcat-server-4x.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-tomcat-webapp-4x.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Beehive</td>
+          <td colspan="1" rowspan="1">beehive-netui-util.jar</td>
+          <td colspan="1" rowspan="1"><em>distribution</em></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">CGLib</td>
+          <td colspan="1" rowspan="1">cglib-full.jar</td>
+          <td colspan="1" rowspan="1">2.0.1</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Jakarta Commons</td>
+          <td colspan="1" rowspan="1">commons-beanutils</td>
+          <td colspan="1" rowspan="1">1.7.0</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Jakarta Commons</td>
+          <td colspan="1" rowspan="1">commons-collections.jar</td>
+          <td colspan="1" rowspan="1">3.0</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Jakarta Commons</td>
+          <td colspan="1" rowspan="1">commons-digester</td>
+          <td colspan="1" rowspan="1">1.6</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Jakarta Commons</td>
+          <td colspan="1" rowspan="1">commons-lang.jar</td>
+          <td colspan="1" rowspan="1">1.0.1</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Jakarta Commons</td>
+          <td colspan="1" rowspan="1">commons-logging.jar</td>
+          <td colspan="1" rowspan="1">1.0.3</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">EHCache</td>
+          <td colspan="1" rowspan="1">echache.jar</td>
+          <td colspan="1" rowspan="1">0.7</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Geronimo</td>
+          <td colspan="1" rowspan="1">geronimo-spec-jta.jar</td>
+          <td colspan="1" rowspan="1">DEV</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">HSQLDB</td>
+          <td colspan="1" rowspan="1">hsqldb.jar</td>
+          <td colspan="1" rowspan="1">1.7.2.2</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">JSTL</td>
+          <td colspan="1" rowspan="1">jstl.jar</td>
+          <td colspan="1" rowspan="1">1.1.1</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Log4J</td>
+          <td colspan="1" rowspan="1">log4j.jar</td>
+          <td colspan="1" rowspan="1">1.2.8</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Servlet API</td>
+          <td colspan="1" rowspan="1">servletapi.jar</td>
+          <td colspan="1" rowspan="1">2.4</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">JSTL <strong>is this right?</strong></td>
+          <td colspan="1" rowspan="1">standard.jar</td>
+          <td colspan="1" rowspan="1">1.1.1</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">StAX</td>
+          <td colspan="1" rowspan="1">stax.jar</td>
+          <td colspan="1" rowspan="1">1.1.1-dev</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">StAX</td>
+          <td colspan="1" rowspan="1">stax-api.jar</td>
+          <td colspan="1" rowspan="1">1.0</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">Struts</td>
+          <td colspan="1" rowspan="1">struts.jar</td>
+          <td colspan="1" rowspan="1">1.1</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">XMLBeans</td>
+          <td colspan="1" rowspan="1">xmlbeans.jar</td>
+          <td colspan="1" rowspan="1">2.0-dev-2</td>
+        
+</tr>
+      
+</table>
+</div>
+</div>
+
+  
+<a name="N102C1"></a><a name="running_ant"></a>
+<h3>Running Ant</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Before you can build the web-app using ant, you must ensure that the <span 
class="codefrag">BEEHIVE_HOME</span>
+    and <span class="codefrag">CATALINA_HOME</span> variables are set 
correctly, along with <span class="codefrag">WEBAPP_DIR</span>.
+    </p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+      
+<tr>
+        
+<th colspan="1" rowspan="1">Variable</th>
+        <th colspan="1" rowspan="1">Value</th>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">BEEHIVE_HOME</td>
+        <td colspan="1" rowspan="1">Top level of the Beehive distribution</td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">CATALINE_HOME</td>
+        <td colspan="1" rowspan="1">Top level of the installed Tomcat 
server</td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">WEBAPP_DIR</td>
+        <td colspan="1" rowspan="1">Top level of the web-app to be built</td>
+      
+</tr>
+    
+</table>
+<p>
+    Once these variables are set correctly, building the deployable web-app 
+    requires a single ant invocation using the build file at <span 
class="codefrag">$BEEHIVE_HOME/ant/buildWebapp.xml</span>.
+    This build-file is invoked using ant's <span class="codefrag">-f 
&lt;buildfile-path&gt;</span> option.
+    The directory of the web-app is passed on the commandline using the <span 
class="codefrag">-Dname=value</span>
+    functionality of ant.  Finally, the <span 
class="codefrag">build.webapp</span> target is invoked.
+    </p>
+<pre class="code">
+ant -f $BEEHIVE_HOME/ant/buildWebapp.xml -Dwebapp.dir=$WEBAPP_DIR build.webapp
+</pre>
+</div>
+
+  
+<a name="N1031F"></a><a name="deploying"></a>
+<h3>Deploying the Web-app</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    The easiest way to deploy the web-app is to create a symlink/shortcut from
+    $WEBAPP_DIR to $CATALINA_HOME/webapps.  Another way would be to simply copy
+    $WEBAPP_DIR to $CATALINE_HOME/webapps.
+    </p>
+<pre class="code">
+ln -s $WEBAPP_DIR $CATALINE_HOME/webapps
+</pre>
+<pre class="code">
+cp -R $WEBAPP_DIR $CATALINE_HOME/webapps
+</pre>
+</div>
+
+  
+<a name="N10333"></a><a name="next"></a>
+<h3>Next...</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Now that you've built and deployed an application, you can see how easy it 
is to modify
+    the flow between pages, adding and removing pages.
+    </p>
+<ul>
+      
+<li>
+<a href="pageflow_altering.html">Altering a Page Flow</a>
+</li>
+    
+</ul>
+</div>
+
+  
+<div class="attribution"></div>
+</div>
+</td><td width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end Content==================-->
+</table>
+</td>
+</tr>
+</table>
+<!--================= end Menu, NavBar, Content ==================-->
+<!--================= start Footer ==================-->
+<table summary="footer" cellspacing="0" cellpadding="0" width="100%" 
border="0">
+<tr>
+<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"><a 
href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a 
href="../skin/images/chapter.gif"></a><a 
href="../skin/images/chapter_open.gif"></a><a 
href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
+</tr>
+<tr>
+<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font 
size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
+          2004&nbsp;The Apache Software Foundation. All rights 
reserved.<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+            //  --></script></font></td>
+</tr>
+<tr>
+<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
+</tr>
+</table>
+<!--================= end Footer ==================-->
+</body>
+</html>

Added: incubator/beehive/site/build/site/pageflow/pageflow_controllers.html
==============================================================================
--- (empty file)
+++ incubator/beehive/site/build/site/pageflow/pageflow_controllers.html        
Wed Nov 10 15:04:32 2004
@@ -0,0 +1,811 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Page Flow Controllers</title>
+<link type="text/css" href="../skin/page.css" rel="stylesheet">
+</head>
+<body text="#000000" bgcolor="#FFFFFF">
+<!--================= start Navigation Path ==================-->
+<table summary="navigation path" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img 
height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font 
size="2" face="Arial, Helvetica, Sans-serif"><script 
src="../skin/breadcrumbs.js" language="JavaScript" 
type="text/javascript"></script></font></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Navigation Path ==================-->
+<!--================= start Banner ==================-->
+<table summary="header with logos" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<!--================= start Group Logo ==================-->
+<td bgcolor="#294563"><a href="http://incubator.apache.org/";><img border="0" 
class="logoImage" alt="Apache Incubator" 
src="../images/_incubator-logo.gif"></a></td>
+<!--================= end Group Logo ==================-->
+<!--================= start Project Logo ==================--><td width="100%" 
align="center" bgcolor="#294563"><a 
href="http://incubator.apache.org/beehive";><img border="0" class="logoImage" 
alt="Apache Beehive" src="../images/_beehive_logo_wide.gif"></a></td>
+<!--================= end Project Logo ==================-->
+<!--================= start Search ==================--><td valign="top" 
rowspan="2" bgcolor="#294563">
+<form target="_blank" action="http://www.google.com/search"; method="get">
+<table summary="search" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#4C6C8F">
+<tr>
+<td colspan="3"><img height="10" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" 
class="spacer"></td><td nowrap="nowrap"><input value="incubator.apache.org" 
name="sitesearch" type="hidden"><input size="15" name="q" id="query" 
type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><input name="Search" value="Search" type="submit">
+<br>
+<font face="Arial, Helvetica, Sans-serif" size="2" color="white">
+                      the Apache Beehive site
+                      
+                      
+                    </font></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img alt="" border="0" height="10" width="9" 
src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" 
height="10" width="9" src="../skin/images/search-right.gif"></td>
+</tr>
+</table>
+</form>
+</td>
+<!--================= start Search ==================--><td 
bgcolor="#294563"><img height="10" width="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" bgcolor="#294563" colspan="2">
+<!--================= start Tabs ==================-->
+<div class="tab">
+<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td width="6"><img alt="" height="8" width="6" 
src="../skin/images/spacer.gif"></td><td valign="bottom">
+<table summary="selected tab" style="height: 1.8em" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-left.gif"></td><td valign="middle" 
bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, 
Sans-serif"><b><a class="base-selected" 
href="../index.html">Home</a></b></font></td><td valign="top" width="5" 
bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-right.gif"></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<!--================= end Tabs ==================-->
+</td><td bgcolor="#294563"><img alt="" width="1" height="1" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Banner ==================-->
+<!--================= start Menu, NavBar, Content ==================-->
+<table summary="page content" bgcolor="#ffffff" width="100%" border="0" 
cellpadding="0" cellspacing="0">
+<tr>
+<td valign="top">
+<table summary="menu" border="0" cellspacing="0" cellpadding="0">
+<tr>
+<!--================= start left top NavBar ==================-->
+<td rowspan="3" valign="top">
+<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, 
Sans-serif">&nbsp;</font></td>
+</tr>
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td>
+<!--================= end left top NavBar ==================--><td 
bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" 
bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" 
valign="top" bgcolor="#4C6C8F">
+<!--================= start Menu items ==================-->
+<div class="menu">
+<ul>
+<li>
+<font color="#CFDCED">Beehive</font>
+<ul>
+        
+<li>
+<a href="../index.html">Welcome</a>
+</li>
+        
+<li>
+<a href="../license.html">License</a>
+</li>
+        
+<li>
+<a href="../downloads.html">Downloads</a>
+</li>
+        
+<li>
+<a href="../faq.html">FAQ</a>
+</li>
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Documentation</font>
+<ul>
+        
+        
+<li>
+<font color="#CFDCED">Page Flows</font>
+<ul>
+            
+<li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<span class="sel"><font color="#ffcc00">Page Flow Controllers</font></span>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
+<a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
+</li>
+            
+<li>
+<a href="../pageflow/guide.html">Page Flow Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Controls</font>
+<ul>
+            
+<li>
+<a href="../controls/tutorial_controls.html">Control Tutorial</a>
+</li>
+            
+<li>
+<a href="../Controls.html">Control Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Web Services</font>
+<ul>
+            
+<li>
+<a href="../wsm/tutorial_wsm.html">Web Services Tutorial</a>
+</li>
+            
+<li>
+<a href="../webservices.html">Web Services (JSR 181)</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Samples</font>
+<ul>
+            
+<li>
+<a href="../jpetstore.html">Petstore</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_Dashboard.html">Petstore Dashboard</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_AddressBook.html">AddressBook/Employee</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-db.html">Database Control</a>
+</li>
+            
+<li>
+<a href="../pageflow/sample_netui-blank.html">Page Flow Project</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-blank.html">Control Project</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_wsm-blank.html">Web Service Project</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<a href="../reference.html">Reference Docs</a>
+</li>
+        
+        
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Community</font>
+<ul>
+        
+<li>
+<a href="../mailinglists.html">Mailing Lists</a>
+</li>
+        
+<li>
+<a href="../contributors.html">Contributors</a>
+</li>
+    
+</ul>
+</li>
+</ul>
+</div>
+<!--================= end Menu items ==================-->
+</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img 
width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" align="left" colspan="2" rowspan="2" 
bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" 
src="../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" 
width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td 
valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img 
height="10" width="10" border="0" alt="" 
src="../skin/images/menu-right.gif"></td>
+</tr>
+<tr>
+<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td><td valign="top" width="100%">
+<table summary="content" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<!--================= start middle NavBar ==================-->
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" 
alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="left" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td align="right" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td width="10" 
bgcolor="#CFDCED"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end middle NavBar ==================-->
+<!--================= start Content==================-->
+<tr>
+<td align="left" width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" 
align="left" width="100%">
+<div class="content">
+<table class="title" summary="">
+<tr>
+<td valign="middle">
+<h1>Page Flow Controllers</h1>
+</td>
+</tr>
+</table>
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#starting_the_controller">Starting the Controller</a>
+</li>
+<li>
+<a href="#fleshing_out_the_controller">Fleshing Out the Controller</a>
+<ul class="minitoc">
+<li>
+<a href="#constant_forwards">Constant Forwards</a>
+</li>
+<li>
+<a href="#conditional_forwards">Conditional Forwards</a>
+</li>
+<li>
+<a href="#handling_forms">Handling Forms</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#next">Next...</a>
+</li>
+</ul>
+
+  
+<a name="N1000C"></a><a name="introduction"></a>
+<h3>Introduction</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    As introduced in the <a href="pageflow_overview.html">Page Flow 
Overview</a>, the
+    following model will be used.
+    </p>
+<p>
+      
+<img alt="implementation page flow" src="images/impl-flow-1.png">
+    </p>
+</div>
+
+  
+<a name="N10021"></a><a name="starting_the_controller"></a>
+<h3>Starting the Controller</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    The first step to writing a controller is to simply create a new basic 
class
+    named <span class="codefrag">Controller.jpf</span>.  The <span 
class="codefrag">jpf</span> extension alerts the
+    build that this class is a special JPF controller class, instead of a 
typical
+    Java class. 
+    </p>
+<pre class="code">
+
+<strong>public class Controller 
+{
+}</strong>
+
+</pre>
+<p>
+    Just as the <span class="codefrag">.jpf</span> extension denotes a special 
Java class, controllers
+    also must subclass <span 
class="codefrag">org.apache.beehive.netui.pageflow.PageFlowController</span>
+    
+</p>
+<pre class="code">
+
+<strong>import org.apache.beehive.netui.pageflow.PageFlowController;</strong>
+
+public class Controller 
+    <strong>extends PageFlowController</strong>
+{
+}
+</pre>
+<p>
+    Additionally, Beehive weaves magic into controller classes using 
annotations.
+    The <span class="codefrag">Jpf.Controller</span> annotation is a required 
marker on your
+    own controller class.
+    </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.PageFlowController;
+<strong>import org.apache.beehive.netui.pageflow.annotations.Jpf;</strong>
+
+<strong>@Jpf.Controller</strong>
+public class Controller 
+    extends PageFlowController
+{
+}
+</pre>
+<p>
+    Now we have the beginnings of a controller implementation.
+    </p>
+</div>
+
+  
+<a name="N10061"></a><a name="fleshing_out_the_controller"></a>
+<h3>Fleshing Out the Controller</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Now that the boilerplate <span class="codefrag">Controller.jpf</span> is 
in place, we can begin
+    to define the methods that intercept navigation and perform the necessary 
logic
+    to determine which JSP page should actually be displayed.  In the above
+    model, these are:
+    </p>
+<ul>
+      
+<li>
+<span class="codefrag">signUp()</span>
+</li>
+      
+<li>
+<span class="codefrag">login()</span>
+</li>
+      
+<li>
+<span class="codefrag">myPage()</span>
+</li>
+    
+</ul>
+<p>
+    For the time being, we are going to ignore the methods that process form 
input.
+    </p>
+<p>
+    When a controller method completes, it must return an indication of what 
page to
+    display to the user.  This is accomplished by returning a <span 
class="codefrag">org.apache.beehive.netui.pageflow.Forward</span>
+    object.  
+    </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    <strong>
+    public Forward signUp()
+    {
+        ...
+    }
+
+    public Forward login()
+    {
+        ...
+    }
+
+    public Forward myPage()
+    {
+        ...
+    }
+    </strong>
+}
+</pre>
+<a name="N1008D"></a><a name="constant_forwards"></a>
+<h4>Constant Forwards</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      For the two simple methods of <span class="codefrag">signUp()</span> and 
<span class="codefrag">login()</span>,
+      there is no special logic to be applied.  They should simply return a 
constant
+      indication to arrive at <span class="codefrag">signup.jsp</span> and 
<span class="codefrag">login.jsp</span>
+      respectively.
+      </p>
+<p>
+      To help with configuration and to avoid having JSP page
+      names within the body of a controller method, Beehive once
+      again uses annotations.  The <span class="codefrag">Jpf.Action</span> and
+      <span class="codefrag">Jpf.Forward</span> annotations are used on each 
method to
+      build an <strong>name to JSP page paths</strong> mapping.  The method
+      then works only in terms of the <strong>id</strong>, and doesn't
+      directly refer to the JSP page path.
+      </p>
+<p>
+      The general form the of <span class="codefrag">Jpf.Action</span>/<span 
class="codefrag">Jpf.Forward</span> annotations are:
+      </p>
+<pre class="code">
[EMAIL PROTECTED](
+  forwards = {
+    @Jpf.Forward( <strong>name="...", path="..."</strong> ),
+    @Jpf.Forward( <strong>name="...", path="..."</strong> ),
+    @Jpf.Forward( <strong>name="...", path="..."</strong> ),
+    @Jpf.Forward( <strong>name="...", path="..."</strong> )
+  }
+)
+</pre>
+<p>
+      For simple methods that forward to a constant path, only a single <span 
class="codefrag">Jpf.Forward</span>
+      is needed.  By convention, names such as <strong>success</strong> and 
<strong>failure</strong>
+      are used, but by no means are required.  It is good practice, though, to 
not simply name the
+      forward based upon the JSP page name since doing so would remove some of 
the decoupling that
+      Beehive applications attempt to achieve.
+      </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="signup.jsp" );
+        }
+    )</strong>
+    public Forward signUp()
+    {
+        ...
+    }
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="login.jsp" );
+        }
+    )</strong>
+    public Forward login()
+    {
+        ...
+    }
+}
+</pre>
+<p>
+      All that is left for these simple constant forward methods is a <span 
class="codefrag">return</span>
+      statement to return the appropriate <span 
class="codefrag">Forward</span> object.  This is accomplished
+      simply by constructing a new <span class="codefrag">Forward</span> with 
the appropriate name.
+      </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="signup.jsp" );
+        }
+    )</strong>
+    public Forward signUp()
+    {
+        <strong>return new Forward( "success" );</strong>
+    }
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="login.jsp" );
+        }
+    )</strong>
+    public Forward login()
+    {
+        <strong>return new Forward( "success" );</strong>
+    }
+}
+</pre>
+</div>
+<a name="N10100"></a><a name="conditional_forwards"></a>
+<h4>Conditional Forwards</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      The <span class="codefrag">myPage()</span> controller method, unlike 
<span class="codefrag">signUp()</span> and <span class="codefrag">login()</span>
+      contains logic to determine if the user has already authenicated 
himself.  Unlike the previous two
+      methods, there will be two different <span 
class="codefrag">Jpf.Forward</span> annotations, and the job of the
+      <span class="codefrag">myPage()</span> method is to figure out which one 
is appropriate to return.  
+      </p>
+<p>
+      We define two forwards named <strong>authenticated</strong> and 
<strong>not_authenticated</strong>,
+      which are linked to <span class="codefrag">mypage.jsp</span> and <span 
class="codefrag">login.jsp</span> respectively.
+      In this case, the determination of authentication is performed by 
checking a <strong>session attribute</strong>
+      to see if the <span class="codefrag">authenticated_user</span> attribute 
has been set.
+      Only the the <span class="codefrag">myPage()</span> method is displayed 
below in order to highlight condition forwards.
+      </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+
+    ...
+    ...
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="authenticated",     path="mypage.jsp" );
+            @Jpf.Forward( name="not_authenticated", path="login.jsp" );
+        }
+    )</strong>
+    public Forward myPage()
+    {
+        HttpServletRequest request = getRequest();
+        HttpSession        session = request.getSession();
+
+        if ( session.getAttribute( "authenticated_user" ) != null )
+        {
+            return new Forward( "authenticated" );
+        }
+
+        return new Forward( "not_authenticated" );
+    }
+}
+</pre>
+<p>
+      You may notice that the body of <span class="codefrag">myPage()</span> 
has no particular logic regarding
+      the user's "My Page" itself.  It simply operates in terms of 
authentication and generically
+      named <span class="codefrag">Forward</span> objects.  This presents a 
possibility of sharing this logic
+      with other controller methods that are concerned with authentication.  
For more ideas
+      along these lines, please see <!--<link 
href="controller_patterns.html">-->Controller Patterns [todo: forthcoming 
document]<!--</link>-->.
+      </p>
+</div>
+<a name="N10146"></a><a name="handling_forms"></a>
+<h4>Handling Forms</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+      Handling form data works similar to other controller methods.  By 
providing a parameter
+      to the controller method, a populated subclass of <span 
class="codefrag">org.apache.beehive.netui.pageflow.FormData</span>
+      available.  In the above model, controller methods that process forms 
have been named
+      with the <span class="codefrag">processXXX(..)</span> convention.
+      </p>
+<ul>
+        
+<li>
+<span class="codefrag">processLogin(...)</span>
+</li>
+        
+<li>
+<span class="codefrag">processSignUp(...)</span>
+</li>
+      
+</ul>
+<p>
+      First, define a subclass of <span class="codefrag">FormData</span>.  It 
may be defined as a <span class="codefrag">static</span>
+      class of the controller itself.  <span class="codefrag">FormData</span> 
classes follow normal JavaBean conventions
+      and require no special annotations.  
+      </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    <strong>public static class LoginForm 
+        extends FormData
+    {
+        private String username;
+        private String password;
+
+        public void setUsername(String username)
+        {
+            this.username = username;
+        }
+
+        public String getUsername()
+        {
+            return this.username;
+        }
+
+        public void setPassword(String password)
+        {
+            this.password = password;
+        }
+
+        public String getPassword()
+        {
+            return this.password;
+        }
+    }</strong>
+
+    ...
+    ...
+
+}
+</pre>
+<p>
+        Defining the <span class="codefrag">processLogin(...)</span> method to 
take a <span class="codefrag">LoginForm</span>
+        parameter is all that is required to have a controller method that can
+        operate upon the submitted form.
+        </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    <strong>public static class LoginForm 
+        extends FormData 
+    {   
+        ...
+        ...
+    }</strong>
+
+    ...
+    ...
+
+    <strong>public Forward processLogin(LoginForm form)
+    {
+        ...
+    }</strong>
+}
+</pre>
+<p>
+      Once again, <span class="codefrag">processLogin(..)</span> is a 
conditional forward controller method.
+      If a user has entered a correct username and password, then they should 
be directed
+      to <span class="codefrag">mypage.jsp</span>, otherwise they will be 
returned back to the <span class="codefrag">login.jsp</span>
+      for another attempt.  Checking username and password is outside of the 
scope of JPF, 
+      and in this example, we rely upon a mythical <span 
class="codefrag">MyAppUtils</span> class to perform
+      this logic.
+      </p>
+<pre class="code">
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    ...
+    ...
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="authenticated",     path="mypage.jsp" );
+            @Jpf.Forward( name="not_authenticated", path="login.jsp" );
+        }
+    )</strong>
+    public Forward processLogin(LoginForm form)
+    {
+        if ( MyAppUtils.authenticate( form.getUsername(),
+                                      form.getPassword() ) )
+        {
+            HttpServletRequest request = getRequest();
+            HttpSession        session = request.getSession();
+
+            session.setAttribute( "authenticated_user", 
+                                  form.getUsername() );
+        
+            return new Forward( "authenticated" );
+        }
+
+        return new Forward( "not_authenticated" );
+    }
+}
+</pre>
+<p>
+      Similar implementation would be done for <span 
class="codefrag">signUp(..)</span>, involving another
+      <span class="codefrag">FormData</span> subclass such as <span 
class="codefrag">SignUpForm</span>.
+      </p>
+</div>
+</div>
+
+  
+<a name="N101AD"></a><a name="next"></a>
+<h3>Next...</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Next, learn about linking this controller class to the JSP pages to allow 
for
+    the interception to occur.
+    </p>
+<ul>
+      
+<li>
+<a href="pageflow_jsp.html">Page Flow JSP</a>
+</li>
+    
+</ul>
+</div>
+
+
+  
+<div class="attribution"></div>
+</div>
+</td><td width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end Content==================-->
+</table>
+</td>
+</tr>
+</table>
+<!--================= end Menu, NavBar, Content ==================-->
+<!--================= start Footer ==================-->
+<table summary="footer" cellspacing="0" cellpadding="0" width="100%" 
border="0">
+<tr>
+<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"><a 
href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a 
href="../skin/images/chapter.gif"></a><a 
href="../skin/images/chapter_open.gif"></a><a 
href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
+</tr>
+<tr>
+<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font 
size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
+          2004&nbsp;The Apache Software Foundation. All rights 
reserved.<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+            //  --></script></font></td>
+</tr>
+<tr>
+<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
+</tr>
+</table>
+<!--================= end Footer ==================-->
+</body>
+</html>

Added: incubator/beehive/site/build/site/pageflow/pageflow_jsp.html
==============================================================================
--- (empty file)
+++ incubator/beehive/site/build/site/pageflow/pageflow_jsp.html        Wed Nov 
10 15:04:32 2004
@@ -0,0 +1,635 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Page Flow JSP</title>
+<link type="text/css" href="../skin/page.css" rel="stylesheet">
+</head>
+<body text="#000000" bgcolor="#FFFFFF">
+<!--================= start Navigation Path ==================-->
+<table summary="navigation path" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img 
height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font 
size="2" face="Arial, Helvetica, Sans-serif"><script 
src="../skin/breadcrumbs.js" language="JavaScript" 
type="text/javascript"></script></font></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Navigation Path ==================-->
+<!--================= start Banner ==================-->
+<table summary="header with logos" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<!--================= start Group Logo ==================-->
+<td bgcolor="#294563"><a href="http://incubator.apache.org/";><img border="0" 
class="logoImage" alt="Apache Incubator" 
src="../images/_incubator-logo.gif"></a></td>
+<!--================= end Group Logo ==================-->
+<!--================= start Project Logo ==================--><td width="100%" 
align="center" bgcolor="#294563"><a 
href="http://incubator.apache.org/beehive";><img border="0" class="logoImage" 
alt="Apache Beehive" src="../images/_beehive_logo_wide.gif"></a></td>
+<!--================= end Project Logo ==================-->
+<!--================= start Search ==================--><td valign="top" 
rowspan="2" bgcolor="#294563">
+<form target="_blank" action="http://www.google.com/search"; method="get">
+<table summary="search" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#4C6C8F">
+<tr>
+<td colspan="3"><img height="10" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" 
class="spacer"></td><td nowrap="nowrap"><input value="incubator.apache.org" 
name="sitesearch" type="hidden"><input size="15" name="q" id="query" 
type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><input name="Search" value="Search" type="submit">
+<br>
+<font face="Arial, Helvetica, Sans-serif" size="2" color="white">
+                      the Apache Beehive site
+                      
+                      
+                    </font></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img alt="" border="0" height="10" width="9" 
src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" 
height="10" width="9" src="../skin/images/search-right.gif"></td>
+</tr>
+</table>
+</form>
+</td>
+<!--================= start Search ==================--><td 
bgcolor="#294563"><img height="10" width="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" bgcolor="#294563" colspan="2">
+<!--================= start Tabs ==================-->
+<div class="tab">
+<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td width="6"><img alt="" height="8" width="6" 
src="../skin/images/spacer.gif"></td><td valign="bottom">
+<table summary="selected tab" style="height: 1.8em" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-left.gif"></td><td valign="middle" 
bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, 
Sans-serif"><b><a class="base-selected" 
href="../index.html">Home</a></b></font></td><td valign="top" width="5" 
bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-right.gif"></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<!--================= end Tabs ==================-->
+</td><td bgcolor="#294563"><img alt="" width="1" height="1" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Banner ==================-->
+<!--================= start Menu, NavBar, Content ==================-->
+<table summary="page content" bgcolor="#ffffff" width="100%" border="0" 
cellpadding="0" cellspacing="0">
+<tr>
+<td valign="top">
+<table summary="menu" border="0" cellspacing="0" cellpadding="0">
+<tr>
+<!--================= start left top NavBar ==================-->
+<td rowspan="3" valign="top">
+<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, 
Sans-serif">&nbsp;</font></td>
+</tr>
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td>
+<!--================= end left top NavBar ==================--><td 
bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" 
bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" 
valign="top" bgcolor="#4C6C8F">
+<!--================= start Menu items ==================-->
+<div class="menu">
+<ul>
+<li>
+<font color="#CFDCED">Beehive</font>
+<ul>
+        
+<li>
+<a href="../index.html">Welcome</a>
+</li>
+        
+<li>
+<a href="../license.html">License</a>
+</li>
+        
+<li>
+<a href="../downloads.html">Downloads</a>
+</li>
+        
+<li>
+<a href="../faq.html">FAQ</a>
+</li>
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Documentation</font>
+<ul>
+        
+        
+<li>
+<font color="#CFDCED">Page Flows</font>
+<ul>
+            
+<li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<span class="sel"><font color="#ffcc00">Page Flow JSP</font></span>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
+<a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
+</li>
+            
+<li>
+<a href="../pageflow/guide.html">Page Flow Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Controls</font>
+<ul>
+            
+<li>
+<a href="../controls/tutorial_controls.html">Control Tutorial</a>
+</li>
+            
+<li>
+<a href="../Controls.html">Control Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Web Services</font>
+<ul>
+            
+<li>
+<a href="../wsm/tutorial_wsm.html">Web Services Tutorial</a>
+</li>
+            
+<li>
+<a href="../webservices.html">Web Services (JSR 181)</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Samples</font>
+<ul>
+            
+<li>
+<a href="../jpetstore.html">Petstore</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_Dashboard.html">Petstore Dashboard</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_AddressBook.html">AddressBook/Employee</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-db.html">Database Control</a>
+</li>
+            
+<li>
+<a href="../pageflow/sample_netui-blank.html">Page Flow Project</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-blank.html">Control Project</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_wsm-blank.html">Web Service Project</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<a href="../reference.html">Reference Docs</a>
+</li>
+        
+        
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Community</font>
+<ul>
+        
+<li>
+<a href="../mailinglists.html">Mailing Lists</a>
+</li>
+        
+<li>
+<a href="../contributors.html">Contributors</a>
+</li>
+    
+</ul>
+</li>
+</ul>
+</div>
+<!--================= end Menu items ==================-->
+</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img 
width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" align="left" colspan="2" rowspan="2" 
bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" 
src="../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" 
width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td 
valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img 
height="10" width="10" border="0" alt="" 
src="../skin/images/menu-right.gif"></td>
+</tr>
+<tr>
+<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td><td valign="top" width="100%">
+<table summary="content" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<!--================= start middle NavBar ==================-->
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" 
alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="left" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td align="right" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td width="10" 
bgcolor="#CFDCED"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end middle NavBar ==================-->
+<!--================= start Content==================-->
+<tr>
+<td align="left" width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" 
align="left" width="100%">
+<div class="content">
+<table class="title" summary="">
+<tr>
+<td valign="middle">
+<h1>Page Flow JSP</h1>
+</td>
+</tr>
+</table>
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#starting_a_jpf_jsp">Starting a JPF JSP</a>
+</li>
+<li>
+<a href="#simple_linking">Simple Linking</a>
+</li>
+<li>
+<a href="#handling_forms">Handling Forms</a>
+</li>
+<li>
+<a href="#next">Next...</a>
+</li>
+</ul>
+
+  
+<a name="N1000C"></a><a name="introduction"></a>
+<h3>Introduction</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Continuing with the same model used in previous pages of this 
documentation set,
+    examples will reference this:
+    </p>
+<p>
+      
+<img alt="implementation flow" src="images/impl-flow-1.png">
+    </p>
+<p>
+    Java Page Flow adds a handful of tag libraries to normal JSP usage to 
assist with the
+    binding of the JSP pages to the controller class.  Of primary importance 
is the
+    <span class="codefrag">netui/tags-html</span> taglib.  Other taglibs 
provide additional functionality
+    </p>
+</div>
+
+  
+<a name="N10023"></a><a name="starting_a_jpf_jsp"></a>
+<h3>Starting a JPF JSP</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    As with <a href="pageflow_controllers.html">Page Flow Controller</a>, a 
certain amount
+    of common boilerplate text is required in each page.  The first two lines 
should set
+    the content-type, the encoding, and import the base netui tag library.  
The <span class="codefrag">taglib</span>
+    binds the netui tags to the <span class="codefrag">netui</span> prefix.
+    </p>
+<pre class="code">
+
+<strong>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%&gt;
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%&gt;</strong>
+
+</pre>
+<p>
+    After the common prolog, the JSP page can be written like most any other 
JSP page,
+    with some tag substitutions occurring:
+    </p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+      
+<tr>
+        
+<th colspan="1" rowspan="1">original tag</th><th colspan="1" 
rowspan="1">replace with</th>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">html</td><td colspan="1" 
rowspan="1">netui:html</td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">body</td><td colspan="1" 
rowspan="1">netui:body</td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">a</td><td colspan="1" rowspan="1">netui:anchor</td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">form</td><td colspan="1" 
rowspan="1">netui:form</td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1"><em>various form elements</em></td><td colspan="1" 
rowspan="1"><em>various netui: elements</em> (see <a 
href="#handling_forms">Handling Forms</a>, below)</td>
+      
+</tr>
+    
+</table>
+<p>
+    In addition to the prolog and general tag substitutions, <span 
class="codefrag">&lt;netui:base&gt;</span>
+    should be present within the <span class="codefrag">&lt;head&gt;</span> 
element.  The resulting general
+    form of a JPF-based JSP page is as follows:
+    </p>
+<pre class="code">
+
+<strong>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%&gt;
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%&gt;
+&lt;netui:html&gt;</strong>
+  &lt;head&gt;
+    &lt;title&gt;...title&gt;
+    <strong>&lt;netui:base/&gt;</strong>
+  &lt;head&gt;
+  <strong>&lt;netui:body&gt;</strong>
+    ..
+    ..
+    ..
+  <strong>&lt;netui:body&gt;
+&lt;netui:html&gt;</strong>
+
+</pre>
+</div>
+
+  
+<a name="N100AE"></a><a name="simple_linking"></a>
+<h3>Simple Linking</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Initially, we will examine simple linking through a controller to another 
JSP page.
+    The <span class="codefrag">&lt;netui:anchor&gt;</span> tag replaces the 
normal <span class="codefrag">&lt;a&gt;</span>
+    HTML anchor tag.  A plain <span class="codefrag">&lt;a&gt;</span> links 
directly from one URL to
+    another, without providing the controller an opportunity to perform any 
conditional
+    logic.  The <span class="codefrag">&lt;netui:anchor&gt;</span> tag will be 
substituted when the
+    page is display to render the correct HTML and Javascript to cause the link
+    to venture through the controller class.
+    </p>
+<p>
+    While it may seem silly to use JPF/netui functionality for simple 
+    <em>constant forward methods</em>, the advantage is that if a page
+    gets renamed or you wish to change the flow through an application,
+    the destination only needs to be changed once, within the controller.
+    Otherwise, you may have to edit a handful of JSP pages manually
+    changing the URLs inside normal <span class="codefrag">&lt;a&gt;</span> 
tags.
+    </p>
+<p>
+    For example, if your application changes and you desire to show a
+    terms-of-service before allowing login, you can simply alter the <span 
class="codefrag">login()</span>
+    controller method to send a user to <span 
class="codefrag">terms_of_service.jsp</span> before
+    further sending him to the actual login screen.
+    </p>
+<p>
+    The <span class="codefrag">&lt;netui:anchor&gt;</span> tag parallels the 
<span class="codefrag">&lt;a&gt;</span>
+    tag but uses a <span class="codefrag">action</span> attribute instead of 
an <span class="codefrag">href</span>.
+    Instead of specifying the URL to another page, the name of the method
+    on the controller class is used, without parenthesis.
+    </p>
+<p>
+    Instead of using <span class="codefrag">&lt;a&gt;</span>
+    
+</p>
+<pre class="code">
+&lt;<strong>a href="login.jsp"</strong>&gt;Login!&lt;/a&gt;
+</pre>
+<p>
+    Use <span class="codefrag">&lt;netui:anchor&gt;</span>
+    
+</p>
+<pre class="code">
+&lt;<strong>netui:anchor action="login"</strong>&gt;Login!&lt;/a&gt;
+</pre>
+<p>
+    When the link is displayed on-screen, clicking it will cause control to
+    go through the <span class="codefrag">Controller</span>'s <span 
class="codefrag">login()</span> method,
+    which will return the correct forward to select the actual next page to
+    display.
+    </p>
+</div>
+
+  
+<a name="N1010A"></a><a name="handling_forms"></a>
+<h3>Handling Forms</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    To connect an on-screen form to the underlying controller's form-handling
+    method, the <span class="codefrag">&lt;netui:form&gt;</span> container 
tag, along with 
+    specialized tags that replace the normal form elements are used within
+    a JSP page.  Similar to how <span 
class="codefrag">&lt;netui:anchor&gt;</span> replaces
+    normal HTML <span class="codefrag">&lt;a&gt;</span> tags, the <span 
class="codefrag">&lt;netui:form&gt;</span>
+    tag replaces the typical HTML <span class="codefrag">&lt;form&gt;</span> 
tag.  Once again,
+    the tag will render the appropriate page so that submission of the form
+    will venture through the named form-handling method of the controller 
class.
+    </p>
+<p>
+    Instead of using <span class="codefrag">&lt;form&gt;</span>
+    
+</p>
+<pre class="code">
+&lt;<strong>form action="LoginServlet"</strong> method="POST"&gt;
+</pre>
+<p>
+    Use <span class="codefrag">&lt;netui:form&gt;</span>
+    
+</p>
+<pre class="code">
+&lt;<strong>netui:form action="processLogin"</strong> method="POST"&gt;
+</pre>
+<p>
+    The other tags typically used with a <span 
class="codefrag">&lt;form&gt;</span> also have
+    replacements from the netui tag library.
+    </p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+      
+<tr>
+        
+<th colspan="1" rowspan="1">original tag</th><th colspan="1" 
rowspan="1">replace with</th><th colspan="1" rowspan="1"><span 
class="codefrag">FormData</span> datatype</th>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">button</td><td colspan="1" 
rowspan="1">netui:button</td><td colspan="1" rowspan="1"><em>optionally 
changing the controller form processing method</em></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input type="checkbox"</td><td colspan="1" 
rowspan="1">netui:checkBox</td><td colspan="1" rowspan="1"><span 
class="codefrag">boolean</span> or <span 
class="codefrag">java.lang.Boolean</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input type="checkbox"</td><td colspan="1" 
rowspan="1">netui:checkBoxGroup</td><td colspan="1" rowspan="1"><span 
class="codefrag">java.lang.String[]</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input type="checkbox"</td><td colspan="1" 
rowspan="1">netui:checkBoxOption</td><td colspan="1" rowspan="1"><em>see <span 
class="codefrag">netui:checkBoxGroup</span></em></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">hidden</td><td colspan="1" 
rowspan="1">netui:hidden</td><td colspan="1" rowspan="1"><span 
class="codefrag">java.lang.String</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input type="radio"</td><td colspan="1" 
rowspan="1">netui:radioButtonGroup</td><td colspan="1" rowspan="1"><span 
class="codefrag">java.lang.String[]</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input type="radio"</td><td colspan="1" 
rowspan="1">netui:radioButtonOption</td><td colspan="1" rowspan="1"><em>see 
<span class="codefrag">netui:radioButtonGroup</span></em></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input type="radio"</td><td colspan="1" 
rowspan="1">netui:select</td><td colspan="1" rowspan="1"><span 
class="codefrag">java.lang.String[]</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">option</td><td colspan="1" 
rowspan="1">netui:option</td><td colspan="1" rowspan="1">see <span 
class="codefrag">netui:option</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">textarea</td><td colspan="1" 
rowspan="1">netui:textArea</td><td colspan="1" rowspan="1"><span 
class="codefrag">java.lang.String</span></td>
+      
+</tr>
+      
+<tr>
+        
+<td colspan="1" rowspan="1">input (type="text")</td><td colspan="1" 
rowspan="1">netui:textBox</td><td colspan="1" rowspan="1"><span 
class="codefrag">java.lang.String</span></td>
+      
+</tr>
+    
+</table>
+<p>
+    For the <span class="codefrag">processLogin(...)</span> form-processing 
method, the matching JSP form would be:
+    </p>
+<pre class="code">
+
+<strong>&lt;netui:form action="processLogin" method="POST"&gt;
+  &lt;netui:textBox name="username" size="20"/&gt;
+  &lt;netui:textBox name="username" size="20" password="true"/&gt;
+  &lt;netui:button  type="submit"   value="Login"/&gt;
+&lt;/netui:form&gt;</strong>
+
+</pre>
+<p>
+    When the user submits the form by clicking upon the <span 
class="codefrag">Login</span> button, an instance of
+    the <span class="codefrag">LoginForm</span> subclass of <span 
class="codefrag">FormData</span> is created and passed to the
+    <span class="codefrag">processLogin(LoginForm form)</span> method of the 
controller class.
+    </p>
+</div>
+
+  
+<a name="N1023A"></a><a name="next"></a>
+<h3>Next...</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Next, learn about how to compile and package up a complete web-app.
+    </p>
+<ul>
+      
+<li>
+<a href="pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+    
+</ul>
+</div>
+
+
+  
+<div class="attribution"></div>
+</div>
+</td><td width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end Content==================-->
+</table>
+</td>
+</tr>
+</table>
+<!--================= end Menu, NavBar, Content ==================-->
+<!--================= start Footer ==================-->
+<table summary="footer" cellspacing="0" cellpadding="0" width="100%" 
border="0">
+<tr>
+<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"><a 
href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a 
href="../skin/images/chapter.gif"></a><a 
href="../skin/images/chapter_open.gif"></a><a 
href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
+</tr>
+<tr>
+<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font 
size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
+          2004&nbsp;The Apache Software Foundation. All rights 
reserved.<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+            //  --></script></font></td>
+</tr>
+<tr>
+<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
+</tr>
+</table>
+<!--================= end Footer ==================-->
+</body>
+</html>

Added: incubator/beehive/site/build/site/pageflow/pageflow_overview.html
==============================================================================
--- (empty file)
+++ incubator/beehive/site/build/site/pageflow/pageflow_overview.html   Wed Nov 
10 15:04:32 2004
@@ -0,0 +1,525 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Page Flow Overview</title>
+<link type="text/css" href="../skin/page.css" rel="stylesheet">
+</head>
+<body text="#000000" bgcolor="#FFFFFF">
+<!--================= start Navigation Path ==================-->
+<table summary="navigation path" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img 
height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font 
size="2" face="Arial, Helvetica, Sans-serif"><script 
src="../skin/breadcrumbs.js" language="JavaScript" 
type="text/javascript"></script></font></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Navigation Path ==================-->
+<!--================= start Banner ==================-->
+<table summary="header with logos" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<!--================= start Group Logo ==================-->
+<td bgcolor="#294563"><a href="http://incubator.apache.org/";><img border="0" 
class="logoImage" alt="Apache Incubator" 
src="../images/_incubator-logo.gif"></a></td>
+<!--================= end Group Logo ==================-->
+<!--================= start Project Logo ==================--><td width="100%" 
align="center" bgcolor="#294563"><a 
href="http://incubator.apache.org/beehive";><img border="0" class="logoImage" 
alt="Apache Beehive" src="../images/_beehive_logo_wide.gif"></a></td>
+<!--================= end Project Logo ==================-->
+<!--================= start Search ==================--><td valign="top" 
rowspan="2" bgcolor="#294563">
+<form target="_blank" action="http://www.google.com/search"; method="get">
+<table summary="search" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#4C6C8F">
+<tr>
+<td colspan="3"><img height="10" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" 
class="spacer"></td><td nowrap="nowrap"><input value="incubator.apache.org" 
name="sitesearch" type="hidden"><input size="15" name="q" id="query" 
type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" 
class="spacer"><input name="Search" value="Search" type="submit">
+<br>
+<font face="Arial, Helvetica, Sans-serif" size="2" color="white">
+                      the Apache Beehive site
+                      
+                      
+                    </font></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td><img alt="" border="0" height="10" width="9" 
src="../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" 
height="10" width="9" src="../skin/images/search-right.gif"></td>
+</tr>
+</table>
+</form>
+</td>
+<!--================= start Search ==================--><td 
bgcolor="#294563"><img height="10" width="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" bgcolor="#294563" colspan="2">
+<!--================= start Tabs ==================-->
+<div class="tab">
+<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td width="6"><img alt="" height="8" width="6" 
src="../skin/images/spacer.gif"></td><td valign="bottom">
+<table summary="selected tab" style="height: 1.8em" border="0" cellpadding="0" 
cellspacing="0">
+<tr>
+<td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-left.gif"></td><td valign="middle" 
bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, 
Sans-serif"><b><a class="base-selected" 
href="../index.html">Home</a></b></font></td><td valign="top" width="5" 
bgcolor="#4C6C8F"><img height="5" width="5" alt="" 
src="../skin/images/tabSel-right.gif"></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<!--================= end Tabs ==================-->
+</td><td bgcolor="#294563"><img alt="" width="1" height="1" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+<!--================= end Banner ==================-->
+<!--================= start Menu, NavBar, Content ==================-->
+<table summary="page content" bgcolor="#ffffff" width="100%" border="0" 
cellpadding="0" cellspacing="0">
+<tr>
+<td valign="top">
+<table summary="menu" border="0" cellspacing="0" cellpadding="0">
+<tr>
+<!--================= start left top NavBar ==================-->
+<td rowspan="3" valign="top">
+<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, 
Sans-serif">&nbsp;</font></td>
+</tr>
+<tr>
+<td bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td>
+<!--================= end left top NavBar ==================--><td 
bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" 
bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" 
valign="top" bgcolor="#4C6C8F">
+<!--================= start Menu items ==================-->
+<div class="menu">
+<ul>
+<li>
+<font color="#CFDCED">Beehive</font>
+<ul>
+        
+<li>
+<a href="../index.html">Welcome</a>
+</li>
+        
+<li>
+<a href="../license.html">License</a>
+</li>
+        
+<li>
+<a href="../downloads.html">Downloads</a>
+</li>
+        
+<li>
+<a href="../faq.html">FAQ</a>
+</li>
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Documentation</font>
+<ul>
+        
+        
+<li>
+<font color="#CFDCED">Page Flows</font>
+<ul>
+            
+<li>
+<span class="sel"><font color="#ffcc00">Page Flow Overview</font></span>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
+<a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
+</li>
+            
+<li>
+<a href="../pageflow/guide.html">Page Flow Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Controls</font>
+<ul>
+            
+<li>
+<a href="../controls/tutorial_controls.html">Control Tutorial</a>
+</li>
+            
+<li>
+<a href="../Controls.html">Control Programming</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Web Services</font>
+<ul>
+            
+<li>
+<a href="../wsm/tutorial_wsm.html">Web Services Tutorial</a>
+</li>
+            
+<li>
+<a href="../webservices.html">Web Services (JSR 181)</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<font color="#CFDCED">Samples</font>
+<ul>
+            
+<li>
+<a href="../jpetstore.html">Petstore</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_Dashboard.html">Petstore Dashboard</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_AddressBook.html">AddressBook/Employee</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-db.html">Database Control</a>
+</li>
+            
+<li>
+<a href="../pageflow/sample_netui-blank.html">Page Flow Project</a>
+</li>
+            
+<li>
+<a href="../controls/sample_controls-blank.html">Control Project</a>
+</li>
+            
+<li>
+<a href="../wsm/sample_wsm-blank.html">Web Service Project</a>
+</li>
+        
+</ul>
+</li>
+        
+<li>
+<a href="../reference.html">Reference Docs</a>
+</li>
+        
+        
+    
+</ul>
+</li>
+<li>
+<font color="#CFDCED">Community</font>
+<ul>
+        
+<li>
+<a href="../mailinglists.html">Mailing Lists</a>
+</li>
+        
+<li>
+<a href="../contributors.html">Contributors</a>
+</li>
+    
+</ul>
+</li>
+</ul>
+</div>
+<!--================= end Menu items ==================-->
+</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img 
width="1" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td valign="bottom" align="left" colspan="2" rowspan="2" 
bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" 
src="../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" 
width="10" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td 
valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img 
height="10" width="10" border="0" alt="" 
src="../skin/images/menu-right.gif"></td>
+</tr>
+<tr>
+<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+</table>
+</td><td valign="top" width="100%">
+<table summary="content" width="100%" border="0" cellpadding="0" 
cellspacing="0">
+<!--================= start middle NavBar ==================-->
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" 
alt="" src="../skin/images/spacer.gif" class="spacer"></td><td align="left" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td align="right" 
width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, 
Helvetica, Sans-serif">
+                &nbsp;
+                
+                </font><img width="10" height="8" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td width="10" 
bgcolor="#CFDCED"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<tr>
+<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end middle NavBar ==================-->
+<!--================= start Content==================-->
+<tr>
+<td align="left" width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td><td colspan="2" 
align="left" width="100%">
+<div class="content">
+<table class="title" summary="">
+<tr>
+<td valign="middle">
+<h1>Page Flow Overview</h1>
+</td>
+</tr>
+</table>
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#logical_flow">The Logical Flow</a>
+</li>
+<li>
+<a href="#implementation_of_flow">The Implementation of the Flow</a>
+</li>
+<li>
+<a href="#next">Next...</a>
+</li>
+</ul>
+
+  
+<a name="N1000C"></a><a name="introduction"></a>
+<h3>Introduction</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    A Java Page Flow (JPF) is a group of Java Server Pages (JSP) and a Java 
class that
+    controls the user experience flow through an application.  In addition to 
allowing
+    complex logic to dictate which pages are displayed, JPF technology helps 
decouple
+    page authoring from application logic by preventing one JSP from directly 
referencing
+    another.
+    </p>
+</div>
+
+  
+<a name="N10016"></a><a name="logical_flow"></a>
+<h3>The Logical Flow</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Writing traditional web applications without JPFs requires a fair amount 
of 
+    logic to be applied within the application's pages.  For example, a site
+    that provides a "My Page" functionality for logged in users would have 
+    to include logic on the home page to determine if the "My Page" link
+    should take the user to the login form or directly to their customized
+    page. 
+    </p>
+<p>
+    Using JPF, the home page of the application would not link directly to
+    either the login page <strong>or</strong> the user's "My Page" location, 
but rather
+    would point back into Java code that makes the decision.
+    </p>
+<p>
+    For the rest of this overview, the following <strong>logical page 
flow</strong> wil
+    be used:
+    </p>
+<p>
+      
+<img alt="logical page flow" src="images/logical-flow-1.png">
+    </p>
+<p>
+    This flow supports several routes from the home page of the application 
+    to the user's "My Page":
+    </p>
+<ol>
+      
+<li>
+        
+<p>
+        
+<span class="codefrag">index.jsp</span> directly to <span 
class="codefrag">mypage.jsp</span> if the user is already logged in.
+        </p>
+      
+</li>
+      
+<li>
+        
+<p>
+        
+<span class="codefrag">index.jsp</span> to <span 
class="codefrag">login.jsp</span> if the user explicitely selects the 'login' 
action.
+        After logging in, the user will be automatically taken to <span 
class="codefrag">mypage.jsp</span>.
+        </p>
+
+        
+<p>
+        In the event of a login failure, <span 
class="codefrag">login.jsp</span> will be redisplayed to give them
+        another opportunity to authenticate themselves.
+        </p>
+      
+</li>
+      
+<li>
+        
+<p>
+        If the user desires to register with the site, he can select the 
action that will
+        take him to <span class="codefrag">signup.jsp</span>.  One signed up, 
the <span class="codefrag">thanks.jsp</span>
+        will be displayed which also allows the user to follow the path 
outlined in #2
+        above to login.
+        </p>
+      
+</li>
+      
+<li>
+        
+<p>
+        In the event a user has already authenticated himself, he will be 
allowed to
+        go directly to his "My Page" at <span 
class="codefrag">mypage.jsp</span>.
+        </p>
+      
+</li>
+    
+</ol>
+</div>
+
+  
+<a name="N1006F"></a><a name="implementation_of_flow"></a>
+<h3>The Implementation of the Flow</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    In the above <strong>logical flow</strong> there are several <em>if</em> 
statements
+    that cause the user flow to vary depending on their previous actions and 
other state.
+    </p>
+<ul>
+      
+<li>
+        
+<em>If the user is not logged in...</em>
+      
+</li>
+      
+<li>
+        
+<em>If the user is logged in...</em>
+      
+</li>
+      
+<li>
+        
+<em>If the user's login attempt fails...</em>
+      
+</li>
+    
+</ul>
+<p>
+    Java Page Flows moves this condition logic out of the JSP pages and into a
+    Java class that controls the movement through the application.  This Java 
class
+    is the <strong>controller</strong> portion of the 
<strong>Model-View-Controller</strong>
+    (MVC) pattern.  This allows a page to be written, for example, that appears
+    to link directly from the home page of the application to the user's "My 
Page".
+    The <strong>controller</strong> is given the opportunity to intercept the 
navigation
+    between the two and redirect the user to the login page, if required.
+    </p>
+<p>
+    Each of the interception points is simply a <strong>method</strong> of the
+    particular <strong>controller</strong> class.  The method may perform any 
required
+    complex logic.  The return-value of the method dictates which page is then
+    displayed.  If a user clicks on the "My Page" link, the method may check if
+    the user is logged in, and if so, return an indication that the <span 
class="codefrag">mypage.jsp</span>
+    should be displayed, otherwise it will return an indication that
+    <span class="codefrag">login.jsp</span> should be presented to the user.
+    </p>
+<p>
+    With normal HTML pages, each page is linked directly to other pages.
+    </p>
+<ul>
+      
+<li>
+<strong>page &gt; page &gt; page &gt; page</strong>
+</li>
+    
+</ul>
+<p>
+    When using JPFs, pages and controller methods are interleaved, 
transparently.
+    </p>
+<ul>
+      
+<li>
+<strong>page &gt; method &gt; page &gt; method &gt; page &gt; method &gt; 
page</strong>
+</li>
+    
+</ul>
+<p>
+    The above <strong>logical page flow</strong> can be redrawn with JPF 
controller methods
+    in mind, as:
+    </p>
+<p>
+      
+<img alt="implementation page flow" src="images/impl-flow-1.png">
+    </p>
+<p>
+    Now it is apparent that to navigation from <span 
class="codefrag">index.jsp</span> to <span class="codefrag">mypage.jsp</span>,
+    the user traverses across the <span class="codefrag">myPage()</span> 
method.  This method performs the necessary
+    check to determine if the user has already been authenticated.  If the 
user has logged in already,
+    it will direct the user straight to <span 
class="codefrag">mypage.jsp</span>, otherwise, it displays <span 
class="codefrag">login.jsp</span>.
+    </p>
+</div>
+
+  
+<a name="N100E2"></a><a name="next"></a>
+<h3>Next...</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>
+    Next, learn about writing a <strong>controller</strong> class with methods.
+    </p>
+<ul>
+      
+<li>
+<a href="pageflow_controllers.html">Page Flow Controller</a>
+</li>
+    
+</ul>
+</div>
+
+      
+
+  
+<div class="attribution"></div>
+</div>
+</td><td width="10"><img width="10" height="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"></td>
+</tr>
+<!--================= end Content==================-->
+</table>
+</td>
+</tr>
+</table>
+<!--================= end Menu, NavBar, Content ==================-->
+<!--================= start Footer ==================-->
+<table summary="footer" cellspacing="0" cellpadding="0" width="100%" 
border="0">
+<tr>
+<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" 
src="../skin/images/spacer.gif" class="spacer"><a 
href="../skin/images/label.gif"></a><a href="../skin/images/page.gif"></a><a 
href="../skin/images/chapter.gif"></a><a 
href="../skin/images/chapter_open.gif"></a><a 
href="../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
+</tr>
+<tr>
+<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font 
size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
+          2004&nbsp;The Apache Software Foundation. All rights 
reserved.<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+            //  --></script></font></td>
+</tr>
+<tr>
+<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
+</tr>
+</table>
+<!--================= end Footer ==================-->
+</body>
+</html>

Modified: incubator/beehive/site/build/site/pageflow/sample_netui-blank.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/sample_netui-blank.html  
(original)
+++ incubator/beehive/site/build/site/pageflow/sample_netui-blank.html  Wed Nov 
10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html   
(original)
+++ incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html   Wed Nov 
10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <span class="sel"><font color="#ffcc00">Page Flow Tutorial</font></span>
 </li>
             

Modified: incubator/beehive/site/build/site/reference.html
==============================================================================
--- incubator/beehive/site/build/site/reference.html    (original)
+++ incubator/beehive/site/build/site/reference.html    Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/webservices.html
==============================================================================
--- incubator/beehive/site/build/site/webservices.html  (original)
+++ incubator/beehive/site/build/site/webservices.html  Wed Nov 10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/wsm/sample_AddressBook.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/sample_AddressBook.html       
(original)
+++ incubator/beehive/site/build/site/wsm/sample_AddressBook.html       Wed Nov 
10 15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/wsm/sample_Dashboard.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/sample_Dashboard.html (original)
+++ incubator/beehive/site/build/site/wsm/sample_Dashboard.html Wed Nov 10 
15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/wsm/sample_wsm-blank.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/sample_wsm-blank.html (original)
+++ incubator/beehive/site/build/site/wsm/sample_wsm-blank.html Wed Nov 10 
15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Modified: incubator/beehive/site/build/site/wsm/tutorial_wsm.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/tutorial_wsm.html     (original)
+++ incubator/beehive/site/build/site/wsm/tutorial_wsm.html     Wed Nov 10 
15:04:32 2004
@@ -127,6 +127,26 @@
 <ul>
             
 <li>
+<a href="../pageflow/pageflow_overview.html">Page Flow Overview</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_controllers.html">Page Flow Controllers</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_jsp.html">Page Flow JSP</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_building.html">Building a Page Flow Web-App</a>
+</li>
+            
+<li>
+<a href="../pageflow/pageflow_altering.html">Altering a Page Flow</a>
+</li>        
+            
+<li>
 <a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a>
 </li>
             

Added: 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_altering.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_altering.xml
       Wed Nov 10 15:04:32 2004
@@ -0,0 +1,211 @@
+<?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>Altering a Page Flow</title>
+  </header>
+  <body>
+
+  <section id="introduction">
+    <title>Introduction</title>
+
+    <p>
+    In the previous pages, you were shown how to stitch together a controller 
class
+    and a set of JSP pages.  One of the most powerful features of the Beehive 
way
+    of building applications is being able to change the flow by editing only 
the
+    controller class file, without having to touch the JSP pages.
+    </p>
+
+  </section>
+
+  <section id="logical_flow_change">
+    <title>Logical Flow Change</title>
+
+    <p>
+    Sometime after deploying the application, it is decided that before 
allowing a
+    user to login, they must first be presented a page describing the terms of 
+    service for using the application.  Additionally, a decision is made to 
have
+    the "Sign Up" action automatically log-in the new user so they don't have
+    to traverse the login screen.
+    </p>
+
+    <p>
+    The original logical flow looked like this:
+    </p>
+
+    <p>
+      <img src="images/logical-flow-1.png" alt="logical flow, before 
alteration"/>
+    </p>
+
+    <p>
+    After these changes, the logical flow now resembles:
+    </p>
+
+    <p>
+      <img src="images/logical-flow-2.png" alt="logical flow, after 
alteration"/>
+    </p>
+ 
+  </section>
+
+  <section id="impl_flow_change">
+    <title>Implementation Flow Change</title>
+
+    <p>
+    To accomodate the new logical flow, the implementation flow model 
originally looked like this:
+    </p>
+
+    <p>
+      <img src="images/impl-flow-1.png" alt="logical flow, after alteration"/>
+    </p>
+
+    <p>
+    After removing <code>thanks.jsp</code>, adding <code>terms.jsp</code>, 
adding an
+    <code>acceptTerms()</code> method, and re-routing the post-signup flow, 
looks like:
+    </p>
+
+    <p>
+      <img src="images/impl-flow-2.png" alt="logical flow, after alteration"/>
+    </p>
+ 
+  </section>
+
+  <section id="changes_to_jsp">
+    <title>Changes Required in the JSPs</title>
+
+    <p>
+    Strictly speaking, no changes to JSP content are required.  Only deletion 
of the 
+    unused <code>thanks.jsp</code> and creation of the <code>terms.jsp</code> 
is
+    all that is required. 
+    </p>
+
+    <p>
+    <strong>Note:</strong>, The <code>signup.jsp</code> page
+    that previously would direct a user to <code>thanks.jsp</code> but will now
+    send him to <code>mypage.jsp</code> requires <em>absolutely no 
changes</em>.
+    </p>
+
+    <p>
+    The <code>terms.jsp</code> page would include a link through a new 
<code>acceptTerms()</code>
+    controller method, similar to:
+    </p>
+<source>
+  &lt;netui:anchor action="acceptTerms"&gt;Accept these Terms of 
Service&lt;/netui:anchor&gt;
+</source>
+
+  </section>
+
+  <section id="changes_to_controller">
+    <title>Changes Required in the Controller Class</title>
+
+    <p>
+    To change the flow, a few simple edits of the controller class are all 
that is required.
+    </p>
+
+    <section id="redirecting_login">
+      <title>Redirect <code>login()</code></title>
+
+      <p>
+      Previous, the <code>login()</code> controller method was defined to 
statically
+      return the forward to <code>login.jsp</code>.  
+      </p>
+
+<source>
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="<strong>login.jsp</strong>" );
+        }
+    )
+    public Forward login()
+    {
+        return new Forward( "success" );
+    }
+</source>
+
+      <p>
+      By changing the <code>path</code> property of the 
<code>Jpf.Forward</code> associated
+      with this page, all links that previously took the user to 
<code>login.jsp</code> will
+      now direct him to <code>terms.jsp</code>.
+      </p>
+
+<source>
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="<strong>terms.jsp</strong>" );
+        }
+    )
+    public Forward login()
+    {
+        return new Forward( "success" );
+    }
+</source>
+
+      <p>
+      The <code>terms.jsp</code> page links through a new 
<code>acceptTerms()</code> 
+      controller method which simply is a static forward to 
<code>login.jsp</code>.      
+      </p>
+
+<source>
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="login.jsp" );
+        }
+    )
+    public Forward acceptTerms()
+    {
+        return new Forward( "success" );
+    }
+</source>
+
+      <p>
+      This biggest change in the controller class is in the 
<code>processSignUp()</code>
+      controller method.  Instead of just recording the user's information, it 
now must
+      also perform the logic of logging in the user automatically.  
Additionally, the
+      forward returned by it will send the user directly to 
<code>mypage.jsp</code>
+      instead of the not-unused <code>thanks.jsp</code> page.
+      </p>
+
+<source>
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="<strong>mypage.jsp</strong>" );
+        }
+    )
+    public Forward processSignUp(SignUpForm form)
+    {
+        // record the user's sign-up information.
+
+        ... 
+        ... 
+
+        // perform automatic login for the user.
+
+        HttpServletRequest request = getRequest();
+        HttpSession        session = request.getSession();
+
+        session.setAttribute( "authenticated_user",
+                              form.getUsername() );
+
+        return new Forward( "success" );
+    }
+</source>
+
+      <p>
+      The flow has successfully be altered to now include a jump through the 
site's
+      terms-of-service and automatically logging-in newly signed-up users.
+      </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/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
       Wed Nov 10 15:04:32 2004
@@ -0,0 +1,325 @@
+<?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>Building a Page Flow Web-App</title>
+  </header>
+  <body>
+
+  <section id="introduction">
+    <title>Introduction</title>
+
+    <p>
+    Now that the theory of Java Page Flows has been explained, you need to know
+    how to concretely put together a web-app that uses JPFs.  Beehive ships 
with
+    a set of Ant buildfiles to make the building of an application much easier.
+    </p>
+
+  </section>
+
+  <section id="source_tree_layout">
+    <title>Source Tree Layout</title>
+
+    <p>
+    The layout of your project may be anywhere on your local disk.  We assume
+    that the environment variable $WEBAPP_DIR points to the top-level of your
+    application.      
+    </p>
+
+    <ul>
+      <li><code>$WEBAPP_DIR/</code>
+        <ul>
+          <li><code>Controller.jpf</code></li>
+          <li><code>index.jsp</code></li>
+          <li><code>login.jsp</code></li>
+          <li><code>signup.jsp</code></li>
+          <li><code>mypage.jsp</code></li>
+          <li><code>resources/</code></li>
+          <li><code>WEB-INF/</code>
+            <ul>
+              <li><code>src/</code></li>
+              <li><code>classes/</code></li>
+              <li><code>lib/</code></li>
+            </ul>
+          </li>
+        </ul>
+      </li>
+    </ul>
+
+    <section id="top_level">
+      <title><code>$WEBAPP_DIR/</code></title>
+
+      <p>
+      The top-level of the web-app, at <code>$WEBAPP_DIR</code> should contain
+      your JSP pages and a <code>Controller.jpf</code>.  When built, the
+      <code>Controller.jpf</code> will be compiled to 
<code>WEB-INF/classes/Controller.jpf</code>.
+      </p>
+
+
+    </section>
+
+    <section id="web-inf">
+      <title><code>$WEBAPP_DIR/WEB-INF/</code></title>
+
+      <p>
+      The <code>$WEBAPP_DIR/WEB-INF/</code> directory is just as it is with 
any other servlet-based
+      application.
+      </p>
+
+    </section>
+
+    <section id="web-inf_src">
+      <title><code>$WEBAPP_DIR/WEB-INF/src/</code></title>
+
+      <p>
+      The <code>$WEBAPP_DIR/WEB-INF/src/</code> directory contains any other 
application 
+      source files that need to be compiled into Java classes.  They will be 
compiled 
+      to <code>$WEBAPP_DIR/WEB-INF/classes/</code>.  Additionally, any extra 
<code>.properties</code> 
+      or <code>.xml</code> files that need to be deployed with your 
application will be copied
+      from the <code>src/</code> directory to the <code>classes/</code> 
directory during the build.
+      </p>
+    
+    </section>
+
+    <section id="web-inf_lib">
+      <title><code>$WEBAPP_DIR/WEB-INF/lib/</code></title>
+
+      <p>
+      As with any other web application, the 
<code>$WEBAPP_DIR/WEB-INF/lib/</code> directory
+      should contain the jars for each dependency of your application, 
including those
+      required by Beehive itself.  The jars required by Beehive are listed 
below.
+      </p>
+
+      <table>
+        <tr>
+          <th>Project</th>
+          <th>Jar</th>
+          <th>Version</th>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-controls.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netui-compiler.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netui-pageflow.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netuid-scoping.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netui-tags-databinding.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netui-tags-html.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netuid-template.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-tomcat-common-4x.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-tomcat-server-4x.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-tomcat-webapp-4x.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>Beehive</td>
+          <td>beehive-netui-util.jar</td>
+          <td><em>distribution</em></td>
+        </tr>
+        <tr>
+          <td>CGLib</td>
+          <td>cglib-full.jar</td>
+          <td>2.0.1</td>
+        </tr>
+        <tr>
+          <td>Jakarta Commons</td>
+          <td>commons-beanutils</td>
+          <td>1.7.0</td>
+        </tr>
+        <tr>
+          <td>Jakarta Commons</td>
+          <td>commons-collections.jar</td>
+          <td>3.0</td>
+        </tr>
+        <tr>
+          <td>Jakarta Commons</td>
+          <td>commons-digester</td>
+          <td>1.6</td>
+        </tr>
+        <tr>
+          <td>Jakarta Commons</td>
+          <td>commons-lang.jar</td>
+          <td>1.0.1</td>
+        </tr>
+        <tr>
+          <td>Jakarta Commons</td>
+          <td>commons-logging.jar</td>
+          <td>1.0.3</td>
+        </tr>
+        <tr>
+          <td>EHCache</td>
+          <td>echache.jar</td>
+          <td>0.7</td>
+        </tr>
+        <tr>
+          <td>Geronimo</td>
+          <td>geronimo-spec-jta.jar</td>
+          <td>DEV</td>
+        </tr>
+        <tr>
+          <td>HSQLDB</td>
+          <td>hsqldb.jar</td>
+          <td>1.7.2.2</td>
+        </tr>
+        <tr>
+          <td>JSTL</td>
+          <td>jstl.jar</td>
+          <td>1.1.1</td>
+        </tr>
+        <tr>
+          <td>Log4J</td>
+          <td>log4j.jar</td>
+          <td>1.2.8</td>
+        </tr>
+        <tr>
+          <td>Servlet API</td>
+          <td>servletapi.jar</td>
+          <td>2.4</td>
+        </tr>
+        <tr>
+          <td>JSTL <strong>is this right?</strong></td>
+          <td>standard.jar</td>
+          <td>1.1.1</td>
+        </tr>
+        <tr>
+          <td>StAX</td>
+          <td>stax.jar</td>
+          <td>1.1.1-dev</td>
+        </tr>
+        <tr>
+          <td>StAX</td>
+          <td>stax-api.jar</td>
+          <td>1.0</td>
+        </tr>
+        <tr>
+          <td>Struts</td>
+          <td>struts.jar</td>
+          <td>1.1</td>
+        </tr>
+        <tr>
+          <td>XMLBeans</td>
+          <td>xmlbeans.jar</td>
+          <td>2.0-dev-2</td>
+        </tr>
+      </table>
+
+    </section>
+
+  </section>
+
+  <section id="running_ant">
+    <title>Running Ant</title>
+
+    <p>
+    Before you can build the web-app using ant, you must ensure that the 
<code>BEEHIVE_HOME</code>
+    and <code>CATALINA_HOME</code> variables are set correctly, along with 
<code>WEBAPP_DIR</code>.
+    </p>
+
+    <table>
+      <tr>
+        <th>Variable</th>
+        <th>Value</th>
+      </tr>
+      <tr>
+        <td>BEEHIVE_HOME</td>
+        <td>Top level of the Beehive distribution</td>
+      </tr>
+      <tr>
+        <td>CATALINE_HOME</td>
+        <td>Top level of the installed Tomcat server</td>
+      </tr>
+      <tr>
+        <td>WEBAPP_DIR</td>
+        <td>Top level of the web-app to be built</td>
+      </tr>
+    </table>
+
+    <p>
+    Once these variables are set correctly, building the deployable web-app 
+    requires a single ant invocation using the build file at 
<code>$BEEHIVE_HOME/ant/buildWebapp.xml</code>.
+    This build-file is invoked using ant's <code>-f 
&lt;buildfile-path&gt;</code> option.
+    The directory of the web-app is passed on the commandline using the 
<code>-Dname=value</code>
+    functionality of ant.  Finally, the <code>build.webapp</code> target is 
invoked.
+    </p>
+
+<source>
+ant -f $BEEHIVE_HOME/ant/buildWebapp.xml -Dwebapp.dir=$WEBAPP_DIR build.webapp
+</source>
+
+  </section>
+
+  <section id="deploying">
+    <title>Deploying the Web-app</title>
+
+    <p>
+    The easiest way to deploy the web-app is to create a symlink/shortcut from
+    $WEBAPP_DIR to $CATALINA_HOME/webapps.  Another way would be to simply copy
+    $WEBAPP_DIR to $CATALINE_HOME/webapps.
+    </p>
+
+<source>
+ln -s $WEBAPP_DIR $CATALINE_HOME/webapps
+</source>
+
+<source>
+cp -R $WEBAPP_DIR $CATALINE_HOME/webapps
+</source>
+
+  </section>
+
+  <section id="next">
+    <title>Next...</title>
+
+    <p>
+    Now that you've built and deployed an application, you can see how easy it 
is to modify
+    the flow between pages, adding and removing pages.
+    </p>
+
+    <ul>
+      <li><link href="pageflow_altering.html">Altering a Page Flow</link></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/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
    Wed Nov 10 15:04:32 2004
@@ -0,0 +1,493 @@
+<?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>Page Flow Controllers</title>
+  </header>
+  <body>
+
+  <section id="introduction">
+    <title>Introduction</title>
+
+    <p>
+    As introduced in the <link href="pageflow_overview.html">Page Flow 
Overview</link>, the
+    following model will be used.
+    </p>
+
+    <p>
+      <img src="images/impl-flow-1.png" alt="implementation page flow"/>
+    </p>
+
+  </section>
+
+  <section id="starting_the_controller">
+    <title>Starting the Controller</title>
+
+    <p>
+    The first step to writing a controller is to simply create a new basic 
class
+    named <code>Controller.jpf</code>.  The <code>jpf</code> extension alerts 
the
+    build that this class is a special JPF controller class, instead of a 
typical
+    Java class. 
+    </p>
+
+<source>
+<strong>public class Controller 
+{
+}</strong>
+</source>
+
+    <p>
+    Just as the <code>.jpf</code> extension denotes a special Java class, 
controllers
+    also must subclass 
<code>org.apache.beehive.netui.pageflow.PageFlowController</code>
+    </p>
+
+<source>
+<strong>import org.apache.beehive.netui.pageflow.PageFlowController;</strong>
+
+public class Controller 
+    <strong>extends PageFlowController</strong>
+{
+}
+</source>
+
+    <p>
+    Additionally, Beehive weaves magic into controller classes using 
annotations.
+    The <code>Jpf.Controller</code> annotation is a required marker on your
+    own controller class.
+    </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.PageFlowController;
+<strong>import org.apache.beehive.netui.pageflow.annotations.Jpf;</strong>
+
+<strong>@Jpf.Controller</strong>
+public class Controller 
+    extends PageFlowController
+{
+}
+</source>
+
+    <p>
+    Now we have the beginnings of a controller implementation.
+    </p>
+
+  </section>
+
+  <section id="fleshing_out_the_controller">
+    <title>Fleshing Out the Controller</title>
+
+    <p>
+    Now that the boilerplate <code>Controller.jpf</code> is in place, we can 
begin
+    to define the methods that intercept navigation and perform the necessary 
logic
+    to determine which JSP page should actually be displayed.  In the above
+    model, these are:
+    </p>
+
+    <ul>
+      <li><code>signUp()</code></li>
+      <li><code>login()</code></li>
+      <li><code>myPage()</code></li>
+    </ul>
+
+    <p>
+    For the time being, we are going to ignore the methods that process form 
input.
+    </p>
+
+    <p>
+    When a controller method completes, it must return an indication of what 
page to
+    display to the user.  This is accomplished by returning a 
<code>org.apache.beehive.netui.pageflow.Forward</code>
+    object.  
+    </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    <strong>
+    public Forward signUp()
+    {
+        ...
+    }
+
+    public Forward login()
+    {
+        ...
+    }
+
+    public Forward myPage()
+    {
+        ...
+    }
+    </strong>
+}
+</source>
+
+    <section id="constant_forwards">
+      <title>Constant Forwards</title>
+
+      <p>
+      For the two simple methods of <code>signUp()</code> and 
<code>login()</code>,
+      there is no special logic to be applied.  They should simply return a 
constant
+      indication to arrive at <code>signup.jsp</code> and 
<code>login.jsp</code>
+      respectively.
+      </p>
+
+      <p>
+      To help with configuration and to avoid having JSP page
+      names within the body of a controller method, Beehive once
+      again uses annotations.  The <code>Jpf.Action</code> and
+      <code>Jpf.Forward</code> annotations are used on each method to
+      build an <strong>name to JSP page paths</strong> mapping.  The method
+      then works only in terms of the <strong>id</strong>, and doesn't
+      directly refer to the JSP page path.
+      </p>
+
+      <p>
+      The general form the of <code>Jpf.Action</code>/<code>Jpf.Forward</code> 
annotations are:
+      </p>
+
+<source>
[EMAIL PROTECTED](
+  forwards = {
+    @Jpf.Forward( <strong>name="...", path="..."</strong> ),
+    @Jpf.Forward( <strong>name="...", path="..."</strong> ),
+    @Jpf.Forward( <strong>name="...", path="..."</strong> ),
+    @Jpf.Forward( <strong>name="...", path="..."</strong> )
+  }
+)
+</source>
+
+      <p>
+      For simple methods that forward to a constant path, only a single 
<code>Jpf.Forward</code>
+      is needed.  By convention, names such as <strong>success</strong> and 
<strong>failure</strong>
+      are used, but by no means are required.  It is good practice, though, to 
not simply name the
+      forward based upon the JSP page name since doing so would remove some of 
the decoupling that
+      Beehive applications attempt to achieve.
+      </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="signup.jsp" );
+        }
+    )</strong>
+    public Forward signUp()
+    {
+        ...
+    }
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="login.jsp" );
+        }
+    )</strong>
+    public Forward login()
+    {
+        ...
+    }
+}
+</source>
+
+      <p>
+      All that is left for these simple constant forward methods is a 
<code>return</code>
+      statement to return the appropriate <code>Forward</code> object.  This 
is accomplished
+      simply by constructing a new <code>Forward</code> with the appropriate 
name.
+      </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="signup.jsp" );
+        }
+    )</strong>
+    public Forward signUp()
+    {
+        <strong>return new Forward( "success" );</strong>
+    }
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="success", path="login.jsp" );
+        }
+    )</strong>
+    public Forward login()
+    {
+        <strong>return new Forward( "success" );</strong>
+    }
+}
+</source>
+
+    </section>
+
+    <section id="conditional_forwards">
+      <title>Conditional Forwards</title>
+
+      <p>
+      The <code>myPage()</code> controller method, unlike 
<code>signUp()</code> and <code>login()</code>
+      contains logic to determine if the user has already authenicated 
himself.  Unlike the previous two
+      methods, there will be two different <code>Jpf.Forward</code> 
annotations, and the job of the
+      <code>myPage()</code> method is to figure out which one is appropriate 
to return.  
+      </p>
+
+      <p>
+      We define two forwards named <strong>authenticated</strong> and 
<strong>not_authenticated</strong>,
+      which are linked to <code>mypage.jsp</code> and <code>login.jsp</code> 
respectively.
+      In this case, the determination of authentication is performed by 
checking a <strong>session attribute</strong>
+      to see if the <code>authenticated_user</code> attribute has been set.
+      Only the the <code>myPage()</code> method is displayed below in order to 
highlight condition forwards.
+      </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+
+    ...
+    ...
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="authenticated",     path="mypage.jsp" );
+            @Jpf.Forward( name="not_authenticated", path="login.jsp" );
+        }
+    )</strong>
+    public Forward myPage()
+    {
+        HttpServletRequest request = getRequest();
+        HttpSession        session = request.getSession();
+
+        if ( session.getAttribute( "authenticated_user" ) != null )
+        {
+            return new Forward( "authenticated" );
+        }
+
+        return new Forward( "not_authenticated" );
+    }
+}
+</source>
+
+      <p>
+      You may notice that the body of <code>myPage()</code> has no particular 
logic regarding
+      the user's "My Page" itself.  It simply operates in terms of 
authentication and generically
+      named <code>Forward</code> objects.  This presents a possibility of 
sharing this logic
+      with other controller methods that are concerned with authentication.  
For more ideas
+      along these lines, please see <!--<link 
href="controller_patterns.html">-->Controller Patterns [todo: forthcoming 
document]<!--</link>-->.
+      </p>
+
+    </section>
+
+    <section id="handling_forms">
+      <title>Handling Forms</title>
+
+      <p>
+      Handling form data works similar to other controller methods.  By 
providing a parameter
+      to the controller method, a populated subclass of 
<code>org.apache.beehive.netui.pageflow.FormData</code>
+      available.  In the above model, controller methods that process forms 
have been named
+      with the <code>processXXX(..)</code> convention.
+      </p>
+
+      <ul>
+        <li><code>processLogin(...)</code></li>
+        <li><code>processSignUp(...)</code></li>
+      </ul>
+
+      <p>
+      First, define a subclass of <code>FormData</code>.  It may be defined as 
a <code>static</code>
+      class of the controller itself.  <code>FormData</code> classes follow 
normal JavaBean conventions
+      and require no special annotations.  
+      </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    <strong>public static class LoginForm 
+        extends FormData
+    {
+        private String username;
+        private String password;
+
+        public void setUsername(String username)
+        {
+            this.username = username;
+        }
+
+        public String getUsername()
+        {
+            return this.username;
+        }
+
+        public void setPassword(String password)
+        {
+            this.password = password;
+        }
+
+        public String getPassword()
+        {
+            return this.password;
+        }
+    }</strong>
+
+    ...
+    ...
+
+}
+</source>
+
+        <p>
+        Defining the <code>processLogin(...)</code> method to take a 
<code>LoginForm</code>
+        parameter is all that is required to have a controller method that can
+        operate upon the submitted form.
+        </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    <strong>public static class LoginForm 
+        extends FormData 
+    {   
+        ...
+        ...
+    }</strong>
+
+    ...
+    ...
+
+    <strong>public Forward processLogin(LoginForm form)
+    {
+        ...
+    }</strong>
+}
+</source>
+
+      <p>
+      Once again, <code>processLogin(..)</code> is a conditional forward 
controller method.
+      If a user has entered a correct username and password, then they should 
be directed
+      to <code>mypage.jsp</code>, otherwise they will be returned back to the 
<code>login.jsp</code>
+      for another attempt.  Checking username and password is outside of the 
scope of JPF, 
+      and in this example, we rely upon a mythical <code>MyAppUtils</code> 
class to perform
+      this logic.
+      </p>
+
+<source>
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+    ...
+    ...
+
+    <strong>@Jpf.Action(
+        forwards = {
+            @Jpf.Forward( name="authenticated",     path="mypage.jsp" );
+            @Jpf.Forward( name="not_authenticated", path="login.jsp" );
+        }
+    )</strong>
+    public Forward processLogin(LoginForm form)
+    {
+        if ( MyAppUtils.authenticate( form.getUsername(),
+                                      form.getPassword() ) )
+        {
+            HttpServletRequest request = getRequest();
+            HttpSession        session = request.getSession();
+
+            session.setAttribute( "authenticated_user", 
+                                  form.getUsername() );
+        
+            return new Forward( "authenticated" );
+        }
+
+        return new Forward( "not_authenticated" );
+    }
+}
+</source>
+
+      <p>
+      Similar implementation would be done for <code>signUp(..)</code>, 
involving another
+      <code>FormData</code> subclass such as <code>SignUpForm</code>.
+      </p>
+
+    </section>
+
+  </section>
+
+  <section id="next">
+    <title>Next...</title>
+    
+    <p>
+    Next, learn about linking this controller class to the JSP pages to allow 
for
+    the interception to occur.
+    </p>
+
+    <ul>
+      <li><link href="pageflow_jsp.html">Page Flow JSP</link></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/site/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
    Wed Nov 10 15:04:32 2004
@@ -0,0 +1,270 @@
+<?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>Page Flow JSP</title>
+  </header>
+  <body>
+
+  <section id="introduction">
+    <title>Introduction</title>
+
+    <p>
+    Continuing with the same model used in previous pages of this 
documentation set,
+    examples will reference this:
+    </p>
+
+    <p>
+      <img src="images/impl-flow-1.png" alt="implementation flow"/>
+    </p>
+
+    <p>
+    Java Page Flow adds a handful of tag libraries to normal JSP usage to 
assist with the
+    binding of the JSP pages to the controller class.  Of primary importance 
is the
+    <code>netui/tags-html</code> taglib.  Other taglibs provide additional 
functionality
+    </p>
+
+  </section>
+
+  <section id="starting_a_jpf_jsp">
+    <title>Starting a JPF JSP</title>
+
+    <p>
+    As with <link href="pageflow_controllers.html">Page Flow 
Controller</link>, a certain amount
+    of common boilerplate text is required in each page.  The first two lines 
should set
+    the content-type, the encoding, and import the base netui tag library.  
The <code>taglib</code>
+    binds the netui tags to the <code>netui</code> prefix.
+    </p>
+
+<source>
+<strong>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%&gt;
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%&gt;</strong>
+</source>
+
+    <p>
+    After the common prolog, the JSP page can be written like most any other 
JSP page,
+    with some tag substitutions occurring:
+    </p>
+
+    <table>
+      <tr>
+        <th>original tag</th><th>replace with</th>
+      </tr>
+      <tr>
+        <td>html</td><td>netui:html</td>
+      </tr>
+      <tr>
+        <td>body</td><td>netui:body</td>
+      </tr>
+      <tr>
+        <td>a</td><td>netui:anchor</td>
+      </tr>
+      <tr>
+        <td>form</td><td>netui:form</td>
+      </tr>
+      <tr>
+        <td><em>various form elements</em></td><td><em>various netui: 
elements</em> (see <link href="#handling_forms">Handling Forms</link>, 
below)</td>
+      </tr>
+    </table>
+
+    <p>
+    In addition to the prolog and general tag substitutions, 
<code>&lt;netui:base&gt;</code>
+    should be present within the <code>&lt;head&gt;</code> element.  The 
resulting general
+    form of a JPF-based JSP page is as follows:
+    </p>
+
+<source>
+<strong>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%&gt;
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%&gt;
+&lt;netui:html&gt;</strong>
+  &lt;head&gt;
+    &lt;title&gt;...title&gt;
+    <strong>&lt;netui:base/&gt;</strong>
+  &lt;head&gt;
+  <strong>&lt;netui:body&gt;</strong>
+    ..
+    ..
+    ..
+  <strong>&lt;netui:body&gt;
+&lt;netui:html&gt;</strong>
+</source>
+
+  </section>
+
+  <section id="simple_linking">
+    <title>Simple Linking</title>
+   
+    <p>
+    Initially, we will examine simple linking through a controller to another 
JSP page.
+    The <code>&lt;netui:anchor&gt;</code> tag replaces the normal 
<code>&lt;a&gt;</code>
+    HTML anchor tag.  A plain <code>&lt;a&gt;</code> links directly from one 
URL to
+    another, without providing the controller an opportunity to perform any 
conditional
+    logic.  The <code>&lt;netui:anchor&gt;</code> tag will be substituted when 
the
+    page is display to render the correct HTML and Javascript to cause the link
+    to venture through the controller class.
+    </p>
+
+    <p>
+    While it may seem silly to use JPF/netui functionality for simple 
+    <em>constant forward methods</em>, the advantage is that if a page
+    gets renamed or you wish to change the flow through an application,
+    the destination only needs to be changed once, within the controller.
+    Otherwise, you may have to edit a handful of JSP pages manually
+    changing the URLs inside normal <code>&lt;a&gt;</code> tags.
+    </p>
+
+    <p>
+    For example, if your application changes and you desire to show a
+    terms-of-service before allowing login, you can simply alter the 
<code>login()</code>
+    controller method to send a user to <code>terms_of_service.jsp</code> 
before
+    further sending him to the actual login screen.
+    </p>
+
+    <p>
+    The <code>&lt;netui:anchor&gt;</code> tag parallels the 
<code>&lt;a&gt;</code>
+    tag but uses a <code>action</code> attribute instead of an 
<code>href</code>.
+    Instead of specifying the URL to another page, the name of the method
+    on the controller class is used, without parenthesis.
+    </p>
+
+    <p>
+    Instead of using <code>&lt;a&gt;</code>
+    </p>
+
+<source>
+&lt;<strong>a href="login.jsp"</strong>&gt;Login!&lt;/a&gt;
+</source>
+
+    <p>
+    Use <code>&lt;netui:anchor&gt;</code>
+    </p>
+
+<source>
+&lt;<strong>netui:anchor action="login"</strong>&gt;Login!&lt;/a&gt;
+</source>
+
+    <p>
+    When the link is displayed on-screen, clicking it will cause control to
+    go through the <code>Controller</code>'s <code>login()</code> method,
+    which will return the correct forward to select the actual next page to
+    display.
+    </p>
+
+  </section>
+
+  <section id="handling_forms">
+    <title>Handling Forms</title>
+
+    <p>
+    To connect an on-screen form to the underlying controller's form-handling
+    method, the <code>&lt;netui:form&gt;</code> container tag, along with 
+    specialized tags that replace the normal form elements are used within
+    a JSP page.  Similar to how <code>&lt;netui:anchor&gt;</code> replaces
+    normal HTML <code>&lt;a&gt;</code> tags, the 
<code>&lt;netui:form&gt;</code>
+    tag replaces the typical HTML <code>&lt;form&gt;</code> tag.  Once again,
+    the tag will render the appropriate page so that submission of the form
+    will venture through the named form-handling method of the controller 
class.
+    </p>
+
+    <p>
+    Instead of using <code>&lt;form&gt;</code>
+    </p>
+
+<source>
+&lt;<strong>form action="LoginServlet"</strong> method="POST"&gt;
+</source>
+
+    <p>
+    Use <code>&lt;netui:form&gt;</code>
+    </p>
+
+
+<source>
+&lt;<strong>netui:form action="processLogin"</strong> method="POST"&gt;
+</source>
+
+    <p>
+    The other tags typically used with a <code>&lt;form&gt;</code> also have
+    replacements from the netui tag library.
+    </p>
+
+    <table>
+      <tr>
+        <th>original tag</th><th>replace with</th><th><code>FormData</code> 
datatype</th>
+      </tr>
+      <tr>
+        <td>button</td><td>netui:button</td><td><em>optionally changing the 
controller form processing method</em></td>
+      </tr>
+      <tr>
+        <td>input 
type="checkbox"</td><td>netui:checkBox</td><td><code>boolean</code> or 
<code>java.lang.Boolean</code></td>
+      </tr>
+      <tr>
+        <td>input 
type="checkbox"</td><td>netui:checkBoxGroup</td><td><code>java.lang.String[]</code></td>
+      </tr>
+      <tr>
+        <td>input type="checkbox"</td><td>netui:checkBoxOption</td><td><em>see 
<code>netui:checkBoxGroup</code></em></td>
+      </tr>
+      <tr>
+        
<td>hidden</td><td>netui:hidden</td><td><code>java.lang.String</code></td>
+      </tr>
+      <tr>
+        <td>input 
type="radio"</td><td>netui:radioButtonGroup</td><td><code>java.lang.String[]</code></td>
+      </tr>
+      <tr>
+        <td>input type="radio"</td><td>netui:radioButtonOption</td><td><em>see 
<code>netui:radioButtonGroup</code></em></td>
+      </tr>
+      <tr>
+        <td>input 
type="radio"</td><td>netui:select</td><td><code>java.lang.String[]</code></td>
+      </tr>
+      <tr>
+        <td>option</td><td>netui:option</td><td>see 
<code>netui:option</code></td>
+      </tr>
+      <tr>
+        
<td>textarea</td><td>netui:textArea</td><td><code>java.lang.String</code></td>
+      </tr>
+      <tr>
+        <td>input 
(type="text")</td><td>netui:textBox</td><td><code>java.lang.String</code></td>
+      </tr>
+    </table>
+
+    <p>
+    For the <code>processLogin(...)</code> form-processing method, the 
matching JSP form would be:
+    </p>
+
+<source>
+<strong>&lt;netui:form action="processLogin" method="POST"&gt;
+  &lt;netui:textBox name="username" size="20"/&gt;
+  &lt;netui:textBox name="username" size="20" password="true"/&gt;
+  &lt;netui:button  type="submit"   value="Login"/&gt;
+&lt;/netui:form&gt;</strong>
+</source>
+
+    <p>
+    When the user submits the form by clicking upon the <code>Login</code> 
button, an instance of
+    the <code>LoginForm</code> subclass of <code>FormData</code> is created 
and passed to the
+    <code>processLogin(LoginForm form)</code> method of the controller class.
+    </p>
+
+  </section>
+
+  <section id="next">
+    <title>Next...</title>
+
+    <p>
+    Next, learn about how to compile and package up a complete web-app.
+    </p>
+
+    <ul>
+      <li><link href="pageflow_building.html">Building a Page Flow 
Web-App</link></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/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
       Wed Nov 10 15:04:32 2004
@@ -0,0 +1,184 @@
+<?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>Page Flow Overview</title>
+  </header>
+  <body>
+
+  <section id="introduction">
+    <title>Introduction</title>
+
+    <p>
+    A Java Page Flow (JPF) is a group of Java Server Pages (JSP) and a Java 
class that
+    controls the user experience flow through an application.  In addition to 
allowing
+    complex logic to dictate which pages are displayed, JPF technology helps 
decouple
+    page authoring from application logic by preventing one JSP from directly 
referencing
+    another.
+    </p>
+
+  </section>
+
+  <section id="logical_flow">
+    <title>The Logical Flow</title>
+
+    <p>
+    Writing traditional web applications without JPFs requires a fair amount 
of 
+    logic to be applied within the application's pages.  For example, a site
+    that provides a "My Page" functionality for logged in users would have 
+    to include logic on the home page to determine if the "My Page" link
+    should take the user to the login form or directly to their customized
+    page. 
+    </p>
+
+    <p>
+    Using JPF, the home page of the application would not link directly to
+    either the login page <strong>or</strong> the user's "My Page" location, 
but rather
+    would point back into Java code that makes the decision.
+    </p>
+
+    <p>
+    For the rest of this overview, the following <strong>logical page 
flow</strong> wil
+    be used:
+    </p>
+
+    <p>
+      <img src="images/logical-flow-1.png" alt="logical page flow"/>
+    </p>
+
+    <p>
+    This flow supports several routes from the home page of the application 
+    to the user's "My Page":
+    </p>
+
+    <ol>
+      <li>
+        <p>
+        <code>index.jsp</code> directly to <code>mypage.jsp</code> if the user 
is already logged in.
+        </p>
+      </li>
+      <li>
+        <p>
+        <code>index.jsp</code> to <code>login.jsp</code> if the user 
explicitely selects the 'login' action.
+        After logging in, the user will be automatically taken to 
<code>mypage.jsp</code>.
+        </p>
+
+        <p>
+        In the event of a login failure, <code>login.jsp</code> will be 
redisplayed to give them
+        another opportunity to authenticate themselves.
+        </p>
+      </li>
+      <li>
+        <p>
+        If the user desires to register with the site, he can select the 
action that will
+        take him to <code>signup.jsp</code>.  One signed up, the 
<code>thanks.jsp</code>
+        will be displayed which also allows the user to follow the path 
outlined in #2
+        above to login.
+        </p>
+      </li>
+      <li>
+        <p>
+        In the event a user has already authenticated himself, he will be 
allowed to
+        go directly to his "My Page" at <code>mypage.jsp</code>.
+        </p>
+      </li>
+    </ol>
+  
+  </section>
+
+  <section id="implementation_of_flow">
+    <title>The Implementation of the Flow</title>
+
+    <p>
+    In the above <strong>logical flow</strong> there are several <em>if</em> 
statements
+    that cause the user flow to vary depending on their previous actions and 
other state.
+    </p>
+
+    <ul>
+      <li>
+        <em>If the user is not logged in...</em>
+      </li>
+      <li>
+        <em>If the user is logged in...</em>
+      </li>
+      <li>
+        <em>If the user's login attempt fails...</em>
+      </li>
+    </ul>
+
+    <p>
+    Java Page Flows moves this condition logic out of the JSP pages and into a
+    Java class that controls the movement through the application.  This Java 
class
+    is the <strong>controller</strong> portion of the 
<strong>Model-View-Controller</strong>
+    (MVC) pattern.  This allows a page to be written, for example, that appears
+    to link directly from the home page of the application to the user's "My 
Page".
+    The <strong>controller</strong> is given the opportunity to intercept the 
navigation
+    between the two and redirect the user to the login page, if required.
+    </p>
+
+    <p>
+    Each of the interception points is simply a <strong>method</strong> of the
+    particular <strong>controller</strong> class.  The method may perform any 
required
+    complex logic.  The return-value of the method dictates which page is then
+    displayed.  If a user clicks on the "My Page" link, the method may check if
+    the user is logged in, and if so, return an indication that the 
<code>mypage.jsp</code>
+    should be displayed, otherwise it will return an indication that
+    <code>login.jsp</code> should be presented to the user.
+    </p>
+
+    <p>
+    With normal HTML pages, each page is linked directly to other pages.
+    </p>
+
+    <ul>
+      <li><strong>page &gt; page &gt; page &gt; page</strong></li>
+    </ul>
+
+    <p>
+    When using JPFs, pages and controller methods are interleaved, 
transparently.
+    </p>
+
+    <ul>
+      <li><strong>page &gt; method &gt; page &gt; method &gt; page &gt; method 
&gt; page</strong></li>
+    </ul>
+
+    <p>
+    The above <strong>logical page flow</strong> can be redrawn with JPF 
controller methods
+    in mind, as:
+    </p>
+
+    <p>
+      <img src="images/impl-flow-1.png" alt="implementation page flow"/>
+    </p>
+
+    <p>
+    Now it is apparent that to navigation from <code>index.jsp</code> to 
<code>mypage.jsp</code>,
+    the user traverses across the <code>myPage()</code> method.  This method 
performs the necessary
+    check to determine if the user has already been authenticated.  If the 
user has logged in already,
+    it will direct the user straight to <code>mypage.jsp</code>, otherwise, it 
displays <code>login.jsp</code>.
+    </p>
+
+  </section>
+
+  <section id="next">
+    <title>Next...</title>
+  
+    <p>
+    Next, learn about writing a <strong>controller</strong> class with methods.
+    </p>
+
+    <ul>
+      <li><link href="pageflow_controllers.html">Page Flow 
Controller</link></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>

Reply via email to