Author: steveh Date: Wed Oct 13 15:07:59 2004 New Revision: 54755 Added: incubator/beehive/trunk/site/build/site/building.html (contents, props changed) incubator/beehive/trunk/site/build/site/controls/ incubator/beehive/trunk/site/build/site/controls/tutorial_controls.html (contents, props changed) incubator/beehive/trunk/site/build/site/jpetstore.html (contents, props changed) incubator/beehive/trunk/site/build/site/pageflow/guide.html (contents, props changed) incubator/beehive/trunk/site/build/site/wsm/ incubator/beehive/trunk/site/build/site/wsm/tutorial_wsm.html (contents, props changed) Modified: incubator/beehive/trunk/site/build/site/Controls.html incubator/beehive/trunk/site/build/site/contributors.html incubator/beehive/trunk/site/build/site/downloads.html incubator/beehive/trunk/site/build/site/faq.html incubator/beehive/trunk/site/build/site/index.html incubator/beehive/trunk/site/build/site/license.html incubator/beehive/trunk/site/build/site/mailinglists.html incubator/beehive/trunk/site/build/site/pageflow/tutorial_pageflow.html incubator/beehive/trunk/site/build/site/reference.html incubator/beehive/trunk/site/build/site/webservices.html Log: Latest content for forrest site (this content will go public).
Modified: incubator/beehive/trunk/site/build/site/Controls.html ============================================================================== --- incubator/beehive/trunk/site/build/site/Controls.html (original) +++ incubator/beehive/trunk/site/build/site/Controls.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <span class="sel"><font color="#ffcc00">Control Programming</font></span> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</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> Added: incubator/beehive/trunk/site/build/site/building.html ============================================================================== --- (empty file) +++ incubator/beehive/trunk/site/build/site/building.html Wed Oct 13 15:07:59 2004 @@ -0,0 +1,998 @@ +<!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>Beehive Page Flow Tutorial</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"> </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> +<span class="sel"><font color="#ffcc00">Building Beehive</font></span> +</li> + +<li> +<font color="#CFDCED">Page Flows</font> +<ul> + +<li> +<a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> +</li> + + +</ul> +</li> + +<li> +<font color="#CFDCED">Controls</font> +<ul> + + +<li> +<a href="Controls.html">Control Programming</a> +</li> + +</ul> +</li> + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + +<li> +<a href="webservices.html">Web Services (JSR 181)</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"> + + + </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"> + + + </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>Beehive Page Flow Tutorial</h1> +</td> +</tr> +</table> +<ul class="minitoc"> +<li> +<a href="#intro">Introduction To the Page Flow Tutorial</a> +<ul class="minitoc"> +<li> +<a href="#Tutorial+Goals">Tutorial Goals</a> +</li> +<li> +<a href="#Note+on+the+Current+State+of+the+Page+Flow+Tutorial">Note on the Current State of the Page Flow Tutorial</a> +</li> +</ul> +</li> +<li> +<a href="#step1">Step 1: Begin the Page Flow Tutorial</a> +<ul class="minitoc"> +<li></li> +<li> +<a href="#Download+and+Install+JDK5">Download and Install JDK5</a> +</li> +<li> +<a href="#Download+and+Install+SVN+%28Subversion+Source+Control%29">Download and Install SVN (Subversion Source Control)</a> +</li> +<li> +<a href="#Download+and+Install+Beehive">Download and Install Beehive</a> +</li> +<li> +<a href="#Install+ANT">Install ANT</a> +</li> +<li> +<a href="#Run+the+">Run the bootstrap Target</a> +</li> +</ul> +</li> +<li> +<a href="#step_2">Step 2: Create a New Page Flow Application</a> +<ul class="minitoc"> +<li> +<a href="#Introduction">Introduction</a> +</li> +<li> +<a href="#To+Create+a+Controller+File">To Create a Controller File</a> +</li> +<li> +<a href="#To+Create+a+JSP+File">To Create a JSP File</a> +</li> +<li> +<a href="#To+Create+the+WEB-INF+directory">To Create the WEB-INF directory</a> +</li> +<li> +<a href="#Compile+the+Page+Flow">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application">To Test the Page Flow Web Application</a> +</li> +</ul> +</li> +<li> +<a href="#step_3">Step 3: Navigation</a> +<ul class="minitoc"> +<li> +<a href="#Create+a+Destination+JSP+Page">Create a Destination JSP Page</a> +</li> +<li> +<a href="#Create+a+Link+to+the+Destination+Page">Create a Link to the Destination Page</a> +</li> +<li> +<a href="#Add+an+Action+Method+to+Handle+the+Link">Add an Action Method to Handle the Link</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N101D6">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N101FE">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10214">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_4">Step 4: Submitting Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Create+a+Submission+Form">To Create a Submission Form</a> +</li> +<li> +<a href="#To+Edit+the+Controller+File+to+Handle+the+Submitted+Data">To Edit the Controller File to Handle the Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N10263">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1028B">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N102A1">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N102B7">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_5">Step 5: Processing and Displaying Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Process+the+Submitted+Data">To Process the Submitted Data</a> +</li> +<li> +<a href="#To+Create+a+JSP+Page+to+Display+Submitted+Data">To Create a JSP Page to Display Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N102E7">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1030F">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10325">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N1033B">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#summary">Summary: Page Flow Tutorial</a> +</li> +</ul> + +<a name="N1000C"></a><a name="intro"></a> +<h3>Introduction To the Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10012"></a><a name="Tutorial+Goals"></a> +<h4>Tutorial Goals</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this tutorial, you will learn:</p> +<ul> + +<li>How to create a basic Page Flow web application</li> + +<li>How to coordinate user navigation with Forward methods</li> + +<li>How to handle data submission and processing with data binding and Form Beans</li> + +<li>How to create a user interface with the <neuti> JSP tag library</li> + +<li>How Page Flows help to separate data processing and data presentation</li> + +</ul> +</div> +<a name="N1002E"></a><a name="Note+on+the+Current+State+of+the+Page+Flow+Tutorial"></a> +<h4>Note on the Current State of the Page Flow Tutorial</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial is currently a work in progress. Unfinished portions of the tutorial are marked [tbd], standing for "to be done". Also the tutorial assumes that you are using a Windows machine, however, with a little common sense it is very easy to run through the tutorial on a Linux machine. For example, where the tutorial tells you to run FOO.cmd, instead run FOO.sh.</p> +<p>Please send any comments to Steve Hanson, at <span class="codefrag">[EMAIL PROTECTED]</span>.</p> +</div> +</div> + +<a name="N1003F"></a><a name="step1"></a> +<h3>Step 1: Begin the Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10045"></a> +<h4></h4> +<div style="margin-left: 0 ; border: 2px"></div> +<a name="N1004B"></a><a name="Download+and+Install+JDK5"></a> +<h4>Download and Install JDK5</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>If you do not have JDK5 installed on your machine, visit <a target="_blank" href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a> and download the latest version of JDK5.</p> +<p>Throughout this tutorial, it is assumed that you have JDK 5 installed at <span class="codefrag">C:\jdk1.5.0</span> +</p> +<p>[tbd: more detailed installation instructions]</p> +</div> +<a name="N10061"></a><a name="Download+and+Install+SVN+%28Subversion+Source+Control%29"></a> +<h4>Download and Install SVN (Subversion Source Control)</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Visit <a target="_blank" href="http://subversion.tigris.org">http://subversion.tigris.org</a> and install the SVN source control system.</p> +<p>[tbd: more detailed installation instructions]</p> +</div> +<a name="N10072"></a><a name="Download+and+Install+Beehive"></a> +<h4>Download and Install Beehive</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + Create a directory called <span class="codefrag">beehive-src</span> on your C: drive. Confirm that the the following directory structure exists: <span class="codefrag">C:/beehive-src</span>. This directory will store the Beehive source and all of your Beehive projects. </p> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd beehive-src</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</span> + +</p> +<p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +<a name="N1009A"></a><a name="Install+ANT"></a> +<h4>Install ANT</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a directory named <span class="codefrag">installed</span>at <span class="codefrag">C:/beehive-src/trunk/installed</span>.</p> +<p>Unzip the file <span class="codefrag">C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</span> into <span class="codefrag">C:/beehive-src/Beehive/installed</span>.</p> +<p>After the file has unzipped, confirm that the following directory structure exists: <span class="codefrag">C:/beehive-src/trunk/installed/apache-ant-1.6.2</span>.</p> +</div> +<a name="N100B9"></a><a name="Run+the+"></a> +<h4>Run the bootstrap Target</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">set BEEHIVE_HOME=C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant bootstrap</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +</div> + +<a name="N100E8"></a><a name="step_2"></a> +<h3>Step 2: Create a New Page Flow Application</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N100EE"></a><a name="Introduction"></a> +<h4>Introduction</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + In this step you will create a Controller file and a JSP page. A Controller file is a Java class (with the JPF file extension) that controls how your web application functions and what it does. The methods in the Controller file determines all of the major features of a web application: how users navigate from page to page, how user requests are handled, and how the web application accesses back-end resources. + </p> +<p> + Controller files control the features of a web application through the use of Action methods. An Action method may do something simple, such as forward a user from one JSP page to another; or it may do something complex, such as receive user input from a JSP page, calculate and/or retrieve other data based on the user input, and forward the user to a JSP page where the results are displayed. + </p> +<p> + The Controller file you create in this step contains one simple Action method. This simple navigational Action method forwards users to the index.jsp page. In the next step, you will create a more complex Action method. + </p> +</div> +<a name="N100FE"></a><a name="To+Create+a+Controller+File"></a> +<h4>To Create a Controller File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this step you will create the Controller file in place in the Tomcat deployment directory.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps</span>, create a directory called <span class="codefrag">pageflow_tutorial</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file called <span class="codefrag">Controller.jpf</span>.</p> +<p>In a text editor (or your IDE of choice), open the file Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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 +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N10125"></a><a name="To+Create+a+JSP+File"></a> +<h4>To Create a JSP File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">index.jsp</span>.</p> +<p>Edit index.jsp so it looks like the following.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>index.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + index.jsp + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N1013D"></a><a name="To+Create+the+WEB-INF+directory"></a> +<h4>To Create the WEB-INF directory</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\netui\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N1015F"></a><a name="Compile+the+Page+Flow"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10172"></a><a name="To+Start+the+Tomcat+Server"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10188"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +</div> +</div> + +<a name="N10199"></a><a name="step_3"></a> +<h3>Step 3: Navigation</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N1019F"></a><a name="Create+a+Destination+JSP+Page"></a> +<h4>Create a Destination JSP Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> +<p>Edit page2.jsp so it looks like the following.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N101B7"></a><a name="Create+a+Link+to+the+Destination+Page"></a> +<h4>Create a Link to the Destination Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/index.jsp.</p> +<p>Edit index.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>index.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + index.jsp + </p> + <p> + <netui:anchor action="toPage2">Link to page2.jsp</netui:anchor> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N101C9"></a><a name="Add+an+Action+Method+to+Handle+the+Link"></a> +<h4>Add an Action Method to Handle the Link</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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; + +public class Controller + extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N101DB"></a><a name="Compile+the+Page+Flow-N101D6"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10203"></a><a name="To+Start+the+Tomcat+Server-N101FE"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10219"></a><a name="To+Test+the+Page+Flow+Web+Application-N10214"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N1022F"></a><a name="Shutdown+Tomcat+Server"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N1023D"></a><a name="step_4"></a> +<h3>Step 4: Submitting Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10243"></a><a name="To+Create+a+Submission+Form"></a> +<h4>To Create a Submission Form</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/page2.jsp</span> so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + <p> + <netui:form action="processData"> + <p>Name:<netui:textBox dataSource="actionForm.name"/> + <p>Age:<netui:textBox dataSource="actionForm.age"/> + <p><netui:button type="submit">Submit</netui:button> + </netui:form> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N10255"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> +<h4>To Edit the Controller File to Handle the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf</span> + +</p> +<p>Edit Controller.jpf so it appears as follows.</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 org.apache.beehive.netui.pageflow.FormData; + [EMAIL PROTECTED] +public class Controller extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + public Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards = { + @Jpf.Forward(name = "success", path = "showData.jsp") + } + ) + public Forward processData(ProcessDataForm form) + { + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + return new Forward("success"); + } + + public static class ProcessDataForm extends FormData + { + private int age; + private String name; + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return this.name; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getAge() + { + return this.age; + } + } +} + </pre> +</div> +<a name="N1026A"></a><a name="Compile+the+Page+Flow-N10263"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10292"></a><a name="To+Start+the+Tomcat+Server-N1028B"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N102A8"></a><a name="To+Test+the+Page+Flow+Web+Application-N102A1"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N102BE"></a><a name="Shutdown+Tomcat+Server-N102B7"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N102CC"></a><a name="step_5"></a> +<h3>Step 5: Processing and Displaying Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N102D2"></a><a name="To+Process+the+Submitted+Data"></a> +<h4>To Process the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p> +<pre class="code"> [EMAIL PROTECTED]( + forwards = { + @Jpf.Forward( name = "success", path = "showData.jsp" ) + } +) +public Forward processData( ProcessDataForm form ) +{ + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + getRequest().setAttribute("data", form); + return new Forward("success"); +} + </pre> +</div> +<a name="N102E1"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> +<h4>To Create a JSP Page to Display Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/pageflow_tutorial. Edit showData.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>showData.jsp</title> + <netui:base/> + </head> + <netui:body> + <p>Name:<netui:span value="${requestScope.data.name}"/> + <p>Age:<netui:span value="${requestScope.data.age}"/> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N102F0"></a><a name="Compile+the+Page+Flow-N102E7"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10318"></a><a name="To+Start+the+Tomcat+Server-N1030F"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N1032E"></a><a name="To+Test+the+Page+Flow+Web+Application-N10325"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N10344"></a><a name="Shutdown+Tomcat+Server-N1033B"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N10352"></a><a name="summary"></a> +<h3>Summary: Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p> +<p>Concepts and Tasks Introduced in This Tutorial</p> +<p>[tbd: more detailed summary]</p> +</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 © + 2004 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/trunk/site/build/site/contributors.html ============================================================================== --- incubator/beehive/trunk/site/build/site/contributors.html (original) +++ incubator/beehive/trunk/site/build/site/contributors.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</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> <span class="sel"><font color="#ffcc00">Contributors</font></span> </li> - + </ul> </li> </ul> Added: incubator/beehive/trunk/site/build/site/controls/tutorial_controls.html ============================================================================== --- (empty file) +++ incubator/beehive/trunk/site/build/site/controls/tutorial_controls.html Wed Oct 13 15:07:59 2004 @@ -0,0 +1,1005 @@ +<!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>Beehive Controls Tutorial</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"> </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> +<a href="../building.html">Building Beehive</a> +</li> + +<li> +<font color="#CFDCED">Page Flows</font> +<ul> + +<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> +<span class="sel"><font color="#ffcc00">Control Tutorial</font></span> +</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">JPetStore Samples</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"> + + + </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"> + + + </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>Beehive Controls Tutorial</h1> +</td> +</tr> +</table> +<ul class="minitoc"> +<li> +<a href="#intro">Introduction</a> +<ul class="minitoc"> +<li> +<a href="#Tutorial+Goals">Tutorial Goals</a> +</li> +</ul> +</li> +<li> +<a href="#step1">Step 1: Begin the Controls Tutorial</a> +<ul class="minitoc"> +<li></li> +<li> +<a href="#Download+and+Install+JDK5">Download and Install JDK5</a> +</li> +<li> +<a href="#Download+and+Install+SVN+%28Subversion+Source+Control%29">Download and Install SVN (Subversion Source Control)</a> +</li> +<li> +<a href="#Download+and+Install+Beehive">Download and Install Beehive</a> +</li> +<li> +<a href="#Install+ANT">Install ANT</a> +</li> +<li> +<a href="#Run+the+">Run the bootstrap Target</a> +</li> +</ul> +</li> +<li> +<a href="#step_2">Step 2: Create Control Implementation and Interface Files</a> +<ul class="minitoc"> +<li> +<a href="#Introduction">Introduction</a> +</li> +<li> +<a href="#To+Create+a+Control%27s+Implementation+File">To Create a Control's Implementation File</a> +</li> +<li> +<a href="#To+Create+the+Control%27s+Interface+File">To Create the Control's Interface File</a> +</li> +<li> +<a href="#To+Create+the+WEB-INF+directory">To Create the WEB-INF directory</a> +</li> +<li> +<a href="#Compile+the+Control">Compile the Control</a> +</li> +<li> +<a href="#Create+a+JSP+Page+to+Test+the+Control">Create a JSP Page to Test the Control</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Control">To Test the Control</a> +</li> +</ul> +</li> +<li> +<a href="#step_3">Step 3: Navigation</a> +<ul class="minitoc"> +<li> +<a href="#Create+a+Destination+JSP+Page">Create a Destination JSP Page</a> +</li> +<li> +<a href="#Create+a+Link+to+the+Destination+Page">Create a Link to the Destination Page</a> +</li> +<li> +<a href="#Add+an+Action+Method+to+Handle+the+Link">Add an Action Method to Handle the Link</a> +</li> +<li> +<a href="#Compile+the+Page+Flow">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1020F">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_4">Step 4: Submitting Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Create+a+Submission+Form">To Create a Submission Form</a> +</li> +<li> +<a href="#To+Edit+the+Controller+File+to+Handle+the+Submitted+Data">To Edit the Controller File to Handle the Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N10274">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1029C">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N102B2">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N102C8">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_5">Step 5: Processing and Displaying Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Process+the+Submitted+Data">To Process the Submitted Data</a> +</li> +<li> +<a href="#To+Create+a+JSP+Page+to+Display+Submitted+Data">To Create a JSP Page to Display Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N102F8">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N10320">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10336">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N1034C">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#summary">Summary: Page Flow Tutorial</a> +</li> +</ul> + +<a name="N1000C"></a><a name="intro"></a> +<h3>Introduction</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10012"></a><a name="Tutorial+Goals"></a> +<h4>Tutorial Goals</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this tutorial, you will learn:</p> +<ul> + +<li>What Beehive Controls are for and what they do</li> + +<li>How to create a Beehive Control interface and implementation</li> + +<li>How to compile a Beehive Control</li> + +<li>How to use a Beehive Control as a component in a larger application</li> + +<li>How to use metadata annotations in Beehive Controls</li> + +<li>How to create custom metadata annotations</li> + +</ul> +</div> +</div> + +<a name="N10032"></a><a name="step1"></a> +<h3>Step 1: Begin the Controls Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10038"></a> +<h4></h4> +<div style="margin-left: 0 ; border: 2px"></div> +<a name="N1003E"></a><a name="Download+and+Install+JDK5"></a> +<h4>Download and Install JDK5</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>If you do not have JDK5 installed on your machine, visit <a target="_blank" href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a> and download the latest version of JDK5.</p> +<p>[tbd]</p> +</div> +<a name="N1004F"></a><a name="Download+and+Install+SVN+%28Subversion+Source+Control%29"></a> +<h4>Download and Install SVN (Subversion Source Control)</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Visit <a target="_blank" href="http://subversion.tigris.org">http://subversion.tigris.org</a> and install the SVN source control system.[tbd]</p> +</div> +<a name="N1005D"></a><a name="Download+and+Install+Beehive"></a> +<h4>Download and Install Beehive</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + Create a directory called <span class="codefrag">beehive-src</span> on your C: drive. Confirm that the the following directory structure exists: <span class="codefrag">C:/beehive-src</span>. This directory will store the Beehive source and all of your Beehive projects. </p> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd beehive-src</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</span> + +</p> +<p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +<a name="N10085"></a><a name="Install+ANT"></a> +<h4>Install ANT</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a directory named <span class="codefrag">installed</span>at <span class="codefrag">C:/beehive-src/trunk/installed</span>.</p> +<p>Unzip the file <span class="codefrag">C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</span> into <span class="codefrag">C:/beehive-src/Beehive/installed</span>.</p> +<p>After the file has unzipped, confirm that the following directory structure exists: <span class="codefrag">C:/beehive-src/trunk/installed/apache-ant-1.6.2</span>.</p> +</div> +<a name="N100A4"></a><a name="Run+the+"></a> +<h4>Run the bootstrap Target</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">set BEEHIVE_HOME=C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant bootstrap</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +</div> + +<a name="N100D3"></a><a name="step_2"></a> +<h3>Step 2: Create Control Implementation and Interface Files</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N100D9"></a><a name="Introduction"></a> +<h4>Introduction</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + [tbd] + </p> +</div> +<a name="N100E3"></a><a name="To+Create+a+Control%27s+Implementation+File"></a> +<h4>To Create a Control's Implementation File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this step you will create the implementation file for your Beehive Control. This is a JAVA file, that contains the bulk of your Control's working code.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps</span>, create a directory called <span class="codefrag">control_tutorial</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</span>, create a directory called <span class="codefrag">hellocontrol</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/hellocontrol</span>, create a file called <span class="codefrag">HelloImpl.jcs</span>.</p> +<p>In a text editor (or your IDE of choice), open the file HelloImpl.jcs.</p> +<p>Edit HelloImpl.jcs so it appears as follows.</p> +<pre class="code"> +package hellocontrol; + +import org.apache.beehive.controls.api.bean.*; + [EMAIL PROTECTED] +public class HelloImpl implements Hello +{ + public String hello() + { + return "Hello, World!"; + } +} + </pre> +</div> +<a name="N10113"></a><a name="To+Create+the+Control%27s+Interface+File"></a> +<h4>To Create the Control's Interface File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>The interface file is a JAVA file, that defines the public face of your control. [tbd]</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</span>, create a file named <span class="codefrag">Hello.java</span>.</p> +<p>Edit index.jsp so it looks like the following.</p> +<pre class="code"> +package hellocontrol; + +import org.apache.beehive.controls.api.bean.ControlInterface; + [EMAIL PROTECTED] +public interface Hello +{ + public String hello(); +} + </pre> +</div> +<a name="N1012E"></a><a name="To+Create+the+WEB-INF+directory"></a> +<h4>To Create the WEB-INF directory</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\netui\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</span> + +</p> +</div> +<a name="N10156"></a><a name="Compile+the+Control"></a> +<h4>Compile the Control</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</span> + +</p> +</div> +<a name="N10169"></a><a name="Create+a+JSP+Page+to+Test+the+Control"></a> +<h4>Create a JSP Page to Test the Control</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>To test your Beehive Control, you need to call the control from some other resource, such as a JAVA application, JSP page, or Page Flow web application. In this step you will call the + control from a JSP page. + </p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</span>, create a file named <span class="codefrag">HelloPage.jsp</span>. + </p> +<p>HelloPage.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>Web Application Page</title> + <netui:base/> + </head> + <netui:body> + <p> + <jsp:useBean class="hellocontrol.Hello" id="helloBean" scope="session"/> + <jsp:getProperty name="helloBean" property="hello"/> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N10184"></a><a name="To+Start+the+Tomcat+Server"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N1019A"></a><a name="To+Test+the+Control"></a> +<h4>To Test the Control</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/control_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +</div> +</div> + +<a name="N101AB"></a><a name="step_3"></a> +<h3>Step 3: Navigation</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N101B1"></a><a name="Create+a+Destination+JSP+Page"></a> +<h4>Create a Destination JSP Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> +<p>Edit page2.jsp so it looks like the following.</p> +<pre class="code"> + +</pre> +</div> +<a name="N101C9"></a><a name="Create+a+Link+to+the+Destination+Page"></a> +<h4>Create a Link to the Destination Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/index.jsp.</p> +<p>Edit index.jsp so it appears as follows.</p> +<pre class="code"> + +</pre> +</div> +<a name="N101DB"></a><a name="Add+an+Action+Method+to+Handle+the+Link"></a> +<h4>Add an Action Method to Handle the Link</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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; + +public class Controller + extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N101ED"></a><a name="Compile+the+Page+Flow"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</span> + +</p> +</div> +<a name="N10215"></a><a name="To+Start+the+Tomcat+Server-N1020F"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N1022B"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/control_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N10241"></a><a name="Shutdown+Tomcat+Server"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N1024F"></a><a name="step_4"></a> +<h3>Step 4: Submitting Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10255"></a><a name="To+Create+a+Submission+Form"></a> +<h4>To Create a Submission Form</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/page2.jsp</span> so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + <p> + <netui:form action="processData"> + <p>Name:<netui:textBox dataSource="actionForm.name"/> + <p>Age:<netui:textBox dataSource="actionForm.age"/> + <p><netui:button type="submit">Submit</netui:button> + </netui:form> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N10267"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> +<h4>To Edit the Controller File to Handle the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial/Controller.jpf</span> + +</p> +<p>Edit Controller.jpf so it appears as follows.</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 org.apache.beehive.netui.pageflow.FormData; + [EMAIL PROTECTED] +public class Controller extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + public Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards = { + @Jpf.Forward(name = "success", path = "showData.jsp") + } + ) + public Forward processData(ProcessDataForm form) + { + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + return new Forward("success"); + } + + public static class ProcessDataForm extends FormData + { + private int age; + private String name; + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return this.name; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getAge() + { + return this.age; + } + } +} + </pre> +</div> +<a name="N1027C"></a><a name="Compile+the+Page+Flow-N10274"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</span> + +</p> +</div> +<a name="N102A4"></a><a name="To+Start+the+Tomcat+Server-N1029C"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N102BA"></a><a name="To+Test+the+Page+Flow+Web+Application-N102B2"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/control_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N102D0"></a><a name="Shutdown+Tomcat+Server-N102C8"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N102DE"></a><a name="step_5"></a> +<h3>Step 5: Processing and Displaying Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N102E4"></a><a name="To+Process+the+Submitted+Data"></a> +<h4>To Process the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p> +<pre class="code"> [EMAIL PROTECTED]( + forwards = { + @Jpf.Forward( name = "success", path = "showData.jsp" ) + } +) +public Forward processData( ProcessDataForm form ) +{ + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + getRequest().setAttribute("data", form); + return new Forward("success"); +} + </pre> +</div> +<a name="N102F3"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> +<h4>To Create a JSP Page to Display Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/control_tutorial. Edit showData.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>showData.jsp</title> + <netui:base/> + </head> + <netui:body> + <p>Name:<netui:span value="${requestScope.data.name}"/> + <p>Age:<netui:span value="${requestScope.data.age}"/> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N10302"></a><a name="Compile+the+Page+Flow-N102F8"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</span> + +</p> +</div> +<a name="N1032A"></a><a name="To+Start+the+Tomcat+Server-N10320"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10340"></a><a name="To+Test+the+Page+Flow+Web+Application-N10336"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/control_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N10356"></a><a name="Shutdown+Tomcat+Server-N1034C"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N10364"></a><a name="summary"></a> +<h3>Summary: Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p> +<p>Concepts and Tasks Introduced in This Tutorial</p> +<ul> + +<li>JSP files make up the presentation layer of a web application</li> + +<li>JPF files contain the code, individual Action methods, that determines the major features of a Workshop web application: how users navigate from page to page, and how data moves around the application.</li> + +<li>User input data is data bound to Form Beans before the data is submitted to an Action method.</li> + +<li>You can use the <netui...> tag library to data bind to Java objects and render them as HTML</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 © + 2004 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/trunk/site/build/site/downloads.html ============================================================================== --- incubator/beehive/trunk/site/build/site/downloads.html (original) +++ incubator/beehive/trunk/site/build/site/downloads.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <li> <font color="#CFDCED">Beehive</font> <ul> - + <li> <a href="index.html">Welcome</a> </li> - + <li> <a href="license.html">License</a> </li> - + <li> <span class="sel"><font color="#ffcc00">Downloads</font></span> </li> - + <li> <a href="faq.html">FAQ</a> </li> - + </ul> </li> <li> <font color="#CFDCED">Documentation</font> <ul> - + +<li> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</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> Modified: incubator/beehive/trunk/site/build/site/faq.html ============================================================================== --- incubator/beehive/trunk/site/build/site/faq.html (original) +++ incubator/beehive/trunk/site/build/site/faq.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> <span class="sel"><font color="#ffcc00">FAQ</font></span> </li> - + </ul> </li> <li> <font color="#CFDCED">Documentation</font> <ul> - + +<li> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</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> Modified: incubator/beehive/trunk/site/build/site/index.html ============================================================================== --- incubator/beehive/trunk/site/build/site/index.html (original) +++ incubator/beehive/trunk/site/build/site/index.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <li> <font color="#CFDCED">Beehive</font> <ul> - + <li> <span class="sel"><font color="#ffcc00">Welcome</font></span> </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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</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> Added: incubator/beehive/trunk/site/build/site/jpetstore.html ============================================================================== --- (empty file) +++ incubator/beehive/trunk/site/build/site/jpetstore.html Wed Oct 13 15:07:59 2004 @@ -0,0 +1,281 @@ +<!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>Apache Beehive Web Services</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"> </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> +<a href="building.html">Building Beehive</a> +</li> + +<li> +<font color="#CFDCED">Page Flows</font> +<ul> + +<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> +<span class="sel"><font color="#ffcc00">JPetStore Samples</font></span> +</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"> + + + </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"> + + + </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>Apache Beehive Web Services</h1> +</td> +</tr> +</table> + + +<p> +See the <a target="_blank" href="http://wiki.apache.org/beehive/Web_20Services">WSM on the Beehive wiki</a> and the +<a target="_blank" href="http://jcp.org/en/jsr/detail?id=181">JSR 181 Spec</a> for more information. +</p> + + +<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 © + 2004 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/trunk/site/build/site/license.html ============================================================================== --- incubator/beehive/trunk/site/build/site/license.html (original) +++ incubator/beehive/trunk/site/build/site/license.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <li> <font color="#CFDCED">Beehive</font> <ul> - + <li> <a href="index.html">Welcome</a> </li> - + <li> <span class="sel"><font color="#ffcc00">License</font></span> </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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</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> Modified: incubator/beehive/trunk/site/build/site/mailinglists.html ============================================================================== --- incubator/beehive/trunk/site/build/site/mailinglists.html (original) +++ incubator/beehive/trunk/site/build/site/mailinglists.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</a> </li> - + +</ul> +</li> + + <li> <a href="reference.html">Reference Docs</a> </li> - + </ul> </li> <li> <font color="#CFDCED">Community</font> <ul> - + <li> <span class="sel"><font color="#ffcc00">Mailing Lists</font></span> </li> - + <li> <a href="contributors.html">Contributors</a> </li> - + </ul> </li> </ul> Added: incubator/beehive/trunk/site/build/site/pageflow/guide.html ============================================================================== --- (empty file) +++ incubator/beehive/trunk/site/build/site/pageflow/guide.html Wed Oct 13 15:07:59 2004 @@ -0,0 +1,1017 @@ +<!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>Beehive Page Flow Tutorial</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"> </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> +<a href="../building.html">Building Beehive</a> +</li> + +<li> +<font color="#CFDCED">Page Flows</font> +<ul> + +<li> +<a href="../pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> +</li> + +<li> +<span class="sel"><font color="#ffcc00">Page Flow Programming</font></span> +</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">JPetStore Samples</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"> + + + </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"> + + + </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>Beehive Page Flow Tutorial</h1> +</td> +</tr> +</table> +<ul class="minitoc"> +<li> +<a href="#intro">Introduction To the Page Flow Tutorial</a> +<ul class="minitoc"> +<li> +<a href="#Tutorial+Goals">Tutorial Goals</a> +</li> +<li> +<a href="#Note+on+the+Current+State+of+the+Page+Flow+Tutorial">Note on the Current State of the Page Flow Tutorial</a> +</li> +</ul> +</li> +<li> +<a href="#step1">Step 1: Begin the Page Flow Tutorial</a> +<ul class="minitoc"> +<li></li> +<li> +<a href="#Download+and+Install+JDK5">Download and Install JDK5</a> +</li> +<li> +<a href="#Download+and+Install+SVN+%28Subversion+Source+Control%29">Download and Install SVN (Subversion Source Control)</a> +</li> +<li> +<a href="#Download+and+Install+Beehive">Download and Install Beehive</a> +</li> +<li> +<a href="#Install+ANT">Install ANT</a> +</li> +<li> +<a href="#Run+the+">Run the bootstrap Target</a> +</li> +</ul> +</li> +<li> +<a href="#step_2">Step 2: Create a New Page Flow Application</a> +<ul class="minitoc"> +<li> +<a href="#Introduction">Introduction</a> +</li> +<li> +<a href="#To+Create+a+Controller+File">To Create a Controller File</a> +</li> +<li> +<a href="#To+Create+a+JSP+File">To Create a JSP File</a> +</li> +<li> +<a href="#To+Create+the+WEB-INF+directory">To Create the WEB-INF directory</a> +</li> +<li> +<a href="#Compile+the+Page+Flow">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application">To Test the Page Flow Web Application</a> +</li> +</ul> +</li> +<li> +<a href="#step_3">Step 3: Navigation</a> +<ul class="minitoc"> +<li> +<a href="#Create+a+Destination+JSP+Page">Create a Destination JSP Page</a> +</li> +<li> +<a href="#Create+a+Link+to+the+Destination+Page">Create a Link to the Destination Page</a> +</li> +<li> +<a href="#Add+an+Action+Method+to+Handle+the+Link">Add an Action Method to Handle the Link</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N101D6">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N101FE">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10214">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_4">Step 4: Submitting Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Create+a+Submission+Form">To Create a Submission Form</a> +</li> +<li> +<a href="#To+Edit+the+Controller+File+to+Handle+the+Submitted+Data">To Edit the Controller File to Handle the Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N10263">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1028B">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N102A1">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N102B7">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_5">Step 5: Processing and Displaying Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Process+the+Submitted+Data">To Process the Submitted Data</a> +</li> +<li> +<a href="#To+Create+a+JSP+Page+to+Display+Submitted+Data">To Create a JSP Page to Display Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N102E7">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1030F">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10325">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N1033B">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#summary">Summary: Page Flow Tutorial</a> +</li> +</ul> + +<a name="N1000C"></a><a name="intro"></a> +<h3>Introduction To the Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10012"></a><a name="Tutorial+Goals"></a> +<h4>Tutorial Goals</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this tutorial, you will learn:</p> +<ul> + +<li>How to create a basic Page Flow web application</li> + +<li>How to coordinate user navigation with Forward methods</li> + +<li>How to handle data submission and processing with data binding and Form Beans</li> + +<li>How to create a user interface with the <neuti> JSP tag library</li> + +<li>How Page Flows help to separate data processing and data presentation</li> + +</ul> +</div> +<a name="N1002E"></a><a name="Note+on+the+Current+State+of+the+Page+Flow+Tutorial"></a> +<h4>Note on the Current State of the Page Flow Tutorial</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial is currently a work in progress. Unfinished portions of the tutorial are marked [tbd], standing for "to be done". Also the tutorial assumes that you are using a Windows machine, however, with a little common sense it is very easy to run through the tutorial on a Linux machine. For example, where the tutorial tells you to run FOO.cmd, instead run FOO.sh.</p> +<p>Please send any comments to Steve Hanson, at <span class="codefrag">[EMAIL PROTECTED]</span>.</p> +</div> +</div> + +<a name="N1003F"></a><a name="step1"></a> +<h3>Step 1: Begin the Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10045"></a> +<h4></h4> +<div style="margin-left: 0 ; border: 2px"></div> +<a name="N1004B"></a><a name="Download+and+Install+JDK5"></a> +<h4>Download and Install JDK5</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>If you do not have JDK5 installed on your machine, visit <a target="_blank" href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a> and download the latest version of JDK5.</p> +<p>Throughout this tutorial, it is assumed that you have JDK 5 installed at <span class="codefrag">C:\jdk1.5.0</span> +</p> +<p>[tbd: more detailed installation instructions]</p> +</div> +<a name="N10061"></a><a name="Download+and+Install+SVN+%28Subversion+Source+Control%29"></a> +<h4>Download and Install SVN (Subversion Source Control)</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Visit <a target="_blank" href="http://subversion.tigris.org">http://subversion.tigris.org</a> and install the SVN source control system.</p> +<p>[tbd: more detailed installation instructions]</p> +</div> +<a name="N10072"></a><a name="Download+and+Install+Beehive"></a> +<h4>Download and Install Beehive</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + Create a directory called <span class="codefrag">beehive-src</span> on your C: drive. Confirm that the the following directory structure exists: <span class="codefrag">C:/beehive-src</span>. This directory will store the Beehive source and all of your Beehive projects. </p> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd beehive-src</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</span> + +</p> +<p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +<a name="N1009A"></a><a name="Install+ANT"></a> +<h4>Install ANT</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a directory named <span class="codefrag">installed</span>at <span class="codefrag">C:/beehive-src/trunk/installed</span>.</p> +<p>Unzip the file <span class="codefrag">C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</span> into <span class="codefrag">C:/beehive-src/Beehive/installed</span>.</p> +<p>After the file has unzipped, confirm that the following directory structure exists: <span class="codefrag">C:/beehive-src/trunk/installed/apache-ant-1.6.2</span>.</p> +</div> +<a name="N100B9"></a><a name="Run+the+"></a> +<h4>Run the bootstrap Target</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">set BEEHIVE_HOME=C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant bootstrap</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +</div> + +<a name="N100E8"></a><a name="step_2"></a> +<h3>Step 2: Create a New Page Flow Application</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N100EE"></a><a name="Introduction"></a> +<h4>Introduction</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + In this step you will create a Controller file and a JSP page. A Controller file is a Java class (with the JPF file extension) that controls how your web application functions and what it does. The methods in the Controller file determines all of the major features of a web application: how users navigate from page to page, how user requests are handled, and how the web application accesses back-end resources. + </p> +<p> + Controller files control the features of a web application through the use of Action methods. An Action method may do something simple, such as forward a user from one JSP page to another; or it may do something complex, such as receive user input from a JSP page, calculate and/or retrieve other data based on the user input, and forward the user to a JSP page where the results are displayed. + </p> +<p> + The Controller file you create in this step contains one simple Action method. This simple navigational Action method forwards users to the index.jsp page. In the next step, you will create a more complex Action method. + </p> +</div> +<a name="N100FE"></a><a name="To+Create+a+Controller+File"></a> +<h4>To Create a Controller File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this step you will create the Controller file in place in the Tomcat deployment directory.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps</span>, create a directory called <span class="codefrag">pageflow_tutorial</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file called <span class="codefrag">Controller.jpf</span>.</p> +<p>In a text editor (or your IDE of choice), open the file Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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 +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N10125"></a><a name="To+Create+a+JSP+File"></a> +<h4>To Create a JSP File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">index.jsp</span>.</p> +<p>Edit index.jsp so it looks like the following.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>index.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + index.jsp + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N1013D"></a><a name="To+Create+the+WEB-INF+directory"></a> +<h4>To Create the WEB-INF directory</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\netui\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N1015F"></a><a name="Compile+the+Page+Flow"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10172"></a><a name="To+Start+the+Tomcat+Server"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10188"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +</div> +</div> + +<a name="N10199"></a><a name="step_3"></a> +<h3>Step 3: Navigation</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N1019F"></a><a name="Create+a+Destination+JSP+Page"></a> +<h4>Create a Destination JSP Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> +<p>Edit page2.jsp so it looks like the following.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N101B7"></a><a name="Create+a+Link+to+the+Destination+Page"></a> +<h4>Create a Link to the Destination Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/index.jsp.</p> +<p>Edit index.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>index.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + index.jsp + </p> + <p> + <netui:anchor action="toPage2">Link to page2.jsp</netui:anchor> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N101C9"></a><a name="Add+an+Action+Method+to+Handle+the+Link"></a> +<h4>Add an Action Method to Handle the Link</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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; + +public class Controller + extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N101DB"></a><a name="Compile+the+Page+Flow-N101D6"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10203"></a><a name="To+Start+the+Tomcat+Server-N101FE"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10219"></a><a name="To+Test+the+Page+Flow+Web+Application-N10214"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N1022F"></a><a name="Shutdown+Tomcat+Server"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N1023D"></a><a name="step_4"></a> +<h3>Step 4: Submitting Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10243"></a><a name="To+Create+a+Submission+Form"></a> +<h4>To Create a Submission Form</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/page2.jsp</span> so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + <p> + <netui:form action="processData"> + <p>Name:<netui:textBox dataSource="actionForm.name"/> + <p>Age:<netui:textBox dataSource="actionForm.age"/> + <p><netui:button type="submit">Submit</netui:button> + </netui:form> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N10255"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> +<h4>To Edit the Controller File to Handle the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf</span> + +</p> +<p>Edit Controller.jpf so it appears as follows.</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 org.apache.beehive.netui.pageflow.FormData; + [EMAIL PROTECTED] +public class Controller extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + public Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards = { + @Jpf.Forward(name = "success", path = "showData.jsp") + } + ) + public Forward processData(ProcessDataForm form) + { + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + return new Forward("success"); + } + + public static class ProcessDataForm extends FormData + { + private int age; + private String name; + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return this.name; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getAge() + { + return this.age; + } + } +} + </pre> +</div> +<a name="N1026A"></a><a name="Compile+the+Page+Flow-N10263"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10292"></a><a name="To+Start+the+Tomcat+Server-N1028B"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N102A8"></a><a name="To+Test+the+Page+Flow+Web+Application-N102A1"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N102BE"></a><a name="Shutdown+Tomcat+Server-N102B7"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N102CC"></a><a name="step_5"></a> +<h3>Step 5: Processing and Displaying Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N102D2"></a><a name="To+Process+the+Submitted+Data"></a> +<h4>To Process the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p> +<pre class="code"> [EMAIL PROTECTED]( + forwards = { + @Jpf.Forward( name = "success", path = "showData.jsp" ) + } +) +public Forward processData( ProcessDataForm form ) +{ + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + getRequest().setAttribute("data", form); + return new Forward("success"); +} + </pre> +</div> +<a name="N102E1"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> +<h4>To Create a JSP Page to Display Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/pageflow_tutorial. Edit showData.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>showData.jsp</title> + <netui:base/> + </head> + <netui:body> + <p>Name:<netui:span value="${requestScope.data.name}"/> + <p>Age:<netui:span value="${requestScope.data.age}"/> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N102F0"></a><a name="Compile+the+Page+Flow-N102E7"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10318"></a><a name="To+Start+the+Tomcat+Server-N1030F"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N1032E"></a><a name="To+Test+the+Page+Flow+Web+Application-N10325"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N10344"></a><a name="Shutdown+Tomcat+Server-N1033B"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N10352"></a><a name="summary"></a> +<h3>Summary: Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p> +<p>Concepts and Tasks Introduced in This Tutorial</p> +<p>[tbd: more detailed summary]</p> +</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 © + 2004 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/trunk/site/build/site/pageflow/tutorial_pageflow.html ============================================================================== --- incubator/beehive/trunk/site/build/site/pageflow/tutorial_pageflow.html (original) +++ incubator/beehive/trunk/site/build/site/pageflow/tutorial_pageflow.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> +<a href="../building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <span class="sel"><font color="#ffcc00">Page Flow Tutorial</font></span> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="../Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="../webservices.html">Web Services (JSR 181)</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> @@ -241,6 +255,9 @@ <li> <a href="#Run+the+">Run the bootstrap Target</a> </li> +<li> +<a href="#Compile+Beehive">Compile Beehive</a> +</li> </ul> </li> <li> @@ -256,7 +273,7 @@ <a href="#To+Create+a+JSP+File">To Create a JSP File</a> </li> <li> -<a href="#To+Create+the+WEB_INF+directory">To Create the WEB_INF directory</a> +<a href="#To+Create+the+WEB-INF+directory%2C+etc.">To Create the WEB-INF directory, etc.</a> </li> <li> <a href="#Compile+the+Page+Flow">Compile the Page Flow</a> @@ -282,13 +299,13 @@ <a href="#Add+an+Action+Method+to+Handle+the+Link">Add an Action Method to Handle the Link</a> </li> <li> -<a href="#Compile+the+Page+Flow-N101D6">Compile the Page Flow</a> +<a href="#Compile+the+Page+Flow-N101DA">Compile the Page Flow</a> </li> <li> -<a href="#To+Start+the+Tomcat+Server-N101FE">To Start the Tomcat Server</a> +<a href="#To+Start+the+Tomcat+Server-N101E7">To Start the Tomcat Server</a> </li> <li> -<a href="#To+Test+the+Page+Flow+Web+Application-N10214">To Test the Page Flow Web Application</a> +<a href="#To+Test+the+Page+Flow+Web+Application-N101F4">To Test the Page Flow Web Application</a> </li> <li> <a href="#Shutdown+Tomcat+Server">Shutdown Tomcat Server</a> @@ -305,16 +322,16 @@ <a href="#To+Edit+the+Controller+File+to+Handle+the+Submitted+Data">To Edit the Controller File to Handle the Submitted Data</a> </li> <li> -<a href="#Compile+the+Page+Flow-N10263">Compile the Page Flow</a> +<a href="#Compile+the+Page+Flow-N10243">Compile the Page Flow</a> </li> <li> -<a href="#To+Start+the+Tomcat+Server-N1028B">To Start the Tomcat Server</a> +<a href="#To+Start+the+Tomcat+Server-N10252">To Start the Tomcat Server</a> </li> <li> -<a href="#To+Test+the+Page+Flow+Web+Application-N102A1">To Test the Page Flow Web Application</a> +<a href="#To+Test+the+Page+Flow+Web+Application-N1025E">To Test the Page Flow Web Application</a> </li> <li> -<a href="#Shutdown+Tomcat+Server-N102B7">Shutdown Tomcat Server</a> +<a href="#Shutdown+Tomcat+Server-N1027A">Shutdown Tomcat Server</a> </li> </ul> </li> @@ -328,16 +345,16 @@ <a href="#To+Create+a+JSP+Page+to+Display+Submitted+Data">To Create a JSP Page to Display Submitted Data</a> </li> <li> -<a href="#Compile+the+Page+Flow-N102E7">Compile the Page Flow</a> +<a href="#Compile+the+Page+Flow-N102AA">Compile the Page Flow</a> </li> <li> -<a href="#To+Start+the+Tomcat+Server-N1030F">To Start the Tomcat Server</a> +<a href="#To+Start+the+Tomcat+Server-N102B7">To Start the Tomcat Server</a> </li> <li> -<a href="#To+Test+the+Page+Flow+Web+Application-N10325">To Test the Page Flow Web Application</a> +<a href="#To+Test+the+Page+Flow+Web+Application-N102C4">To Test the Page Flow Web Application</a> </li> <li> -<a href="#Shutdown+Tomcat+Server-N1033B">Shutdown Tomcat Server</a> +<a href="#Shutdown+Tomcat+Server-N102E0">Shutdown Tomcat Server</a> </li> </ul> </li> @@ -345,7 +362,7 @@ <a href="#summary">Summary: Page Flow Tutorial</a> </li> </ul> - + <a name="N1000C"></a><a name="intro"></a> <h3>Introduction To the Page Flow Tutorial</h3> <div style="margin-left: 0 ; border: 2px"> @@ -354,112 +371,121 @@ <div style="margin-left: 0 ; border: 2px"> <p>In this tutorial, you will learn:</p> <ul> - + <li>How to create a basic Page Flow web application</li> - + <li>How to coordinate user navigation with Forward methods</li> - + <li>How to handle data submission and processing with data binding and Form Beans</li> - + <li>How to create a user interface with the <neuti> JSP tag library</li> - + <li>How Page Flows help to separate data processing and data presentation</li> - + </ul> </div> <a name="N1002E"></a><a name="Note+on+the+Current+State+of+the+Page+Flow+Tutorial"></a> <h4>Note on the Current State of the Page Flow Tutorial</h4> <div style="margin-left: 0 ; border: 2px"> -<p>This tutorial is currently a work in progress. Unfinished portions of the tutorial are marked [tbd], standing for "to be done". Also the tutorial assumes that you are using a Windows machine, however, with a little common sense it is very easy to run through the tutorial on a Linux machine. For example, where the tutorial tells you to run FOO.cmd, instead run FOO.sh.</p> -<p>Please send any comments to Steve Hanson, at <span class="codefrag">[EMAIL PROTECTED]</span>.</p> +<p>This tutorial is currently a work in progress. Please send any comments to Steve Hanson, at <span class="codefrag">[EMAIL PROTECTED]</span>. Also the tutorial assumes that you are using a Windows machine, however, with a little common sense it is very easy to run through the tutorial on a Linux machine. For example, where the tutorial tells you to run FOO.cmd, instead run FOO.sh.</p> </div> </div> - -<a name="N1003F"></a><a name="step1"></a> + +<a name="N1003C"></a><a name="step1"></a> <h3>Step 1: Begin the Page Flow Tutorial</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N10045"></a> +<a name="N10042"></a> <h4></h4> <div style="margin-left: 0 ; border: 2px"></div> -<a name="N1004B"></a><a name="Download+and+Install+JDK5"></a> +<a name="N10048"></a><a name="Download+and+Install+JDK5"></a> <h4>Download and Install JDK5</h4> <div style="margin-left: 0 ; border: 2px"> <p>If you do not have JDK5 installed on your machine, visit <a target="_blank" href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a> and download the latest version of JDK5.</p> <p>Throughout this tutorial, it is assumed that you have JDK 5 installed at <span class="codefrag">C:\jdk1.5.0</span> + +</p> +<p> +<!--[tbd: more detailed installation instructions]--> </p> -<p>[tbd: more detailed installation instructions]</p> </div> -<a name="N10061"></a><a name="Download+and+Install+SVN+%28Subversion+Source+Control%29"></a> +<a name="N1005F"></a><a name="Download+and+Install+SVN+%28Subversion+Source+Control%29"></a> <h4>Download and Install SVN (Subversion Source Control)</h4> <div style="margin-left: 0 ; border: 2px"> <p>Visit <a target="_blank" href="http://subversion.tigris.org">http://subversion.tigris.org</a> and install the SVN source control system.</p> -<p>[tbd: more detailed installation instructions]</p> +<p> +<!--[tbd: more detailed installation instructions]--> +</p> </div> -<a name="N10072"></a><a name="Download+and+Install+Beehive"></a> +<a name="N10070"></a><a name="Download+and+Install+Beehive"></a> <h4>Download and Install Beehive</h4> <div style="margin-left: 0 ; border: 2px"> <p> Create a directory called <span class="codefrag">beehive-src</span> on your C: drive. Confirm that the the following directory structure exists: <span class="codefrag">C:/beehive-src</span>. This directory will store the Beehive source and all of your Beehive projects. </p> <p>Open a command shell.</p> <p>At the command prompt, enter: <span class="codefrag">cd beehive-src</span> - + </p> <p>At the command prompt, enter: <span class="codefrag">svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</span> - + </p> <p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p> <p>At the command prompt, enter: <span class="codefrag">exit</span> - + </p> </div> -<a name="N1009A"></a><a name="Install+ANT"></a> +<a name="N10098"></a><a name="Install+ANT"></a> <h4>Install ANT</h4> <div style="margin-left: 0 ; border: 2px"> <p>Create a directory named <span class="codefrag">installed</span>at <span class="codefrag">C:/beehive-src/trunk/installed</span>.</p> <p>Unzip the file <span class="codefrag">C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</span> into <span class="codefrag">C:/beehive-src/Beehive/installed</span>.</p> <p>After the file has unzipped, confirm that the following directory structure exists: <span class="codefrag">C:/beehive-src/trunk/installed/apache-ant-1.6.2</span>.</p> </div> -<a name="N100B9"></a><a name="Run+the+"></a> +<a name="N100B7"></a><a name="Run+the+"></a> <h4>Run the bootstrap Target</h4> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> - + </p> <p>At the command prompt, enter: <span class="codefrag">set BEEHIVE_HOME=C:\beehive-src\trunk</span> - + </p> <p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> - + </p> <p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> - + </p> <p>At the command prompt, enter: <span class="codefrag">ant bootstrap</span> - + </p> -<p>At the command prompt, enter: <span class="codefrag">exit</span> - +</div> +<a name="N100DF"></a><a name="Compile+Beehive"></a> +<h4>Compile Beehive</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">ant deploy</span> + </p> +<p>Leave this command shell open so you can use it in the next step of the tutorial.</p> </div> </div> - -<a name="N100E8"></a><a name="step_2"></a> + +<a name="N100F0"></a><a name="step_2"></a> <h3>Step 2: Create a New Page Flow Application</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N100EE"></a><a name="Introduction"></a> +<a name="N100F6"></a><a name="Introduction"></a> <h4>Introduction</h4> <div style="margin-left: 0 ; border: 2px"> <p> - In this step you will create a Controller file and a JSP page. A Controller file is a Java class (with the JPF file extension) that controls how your web application functions and what it does. The methods in the Controller file determines all of the major features of a web application: how users navigate from page to page, how user requests are handled, and how the web application accesses back-end resources. + In this step you will create a Controller file and a JSP page. These are the basic files in a Page Flow web application. Each Page Flow contains one Controller file and any number of JSP pages. A Controller file is a Java class (with the JPF file extension) that controls how your web application functions and what it does. The methods in the Controller file determines all of the major features of a web application: how users navigate from page to page, how user requests are handled, and how the web application accesses back-end resources. The JSP pages determine what a visitor to the web sees in the browser. (In terms of the Model-View-Controller paradigm for web applications: the Controller file is the Controller (naturally), and the JSP pages are the View. The web application we are buildng in this tutorial does not contain a Model. <!--[tbd: more, explain]-->) </p> <p> - Controller files control the features of a web application through the use of Action methods. An Action method may do something simple, such as forward a user from one JSP page to another; or it may do something complex, such as receive user input from a JSP page, calculate and/or retrieve other data based on the user input, and forward the user to a JSP page where the results are displayed. + Controller files contain Action methods. An Action method may do something simple, such as forward a user from one JSP page to another; or it may do something complex, such as receive user input from a JSP page, calculate and/or retrieve other data based on the user input, and forward the user to a JSP page where the results are displayed. <!--[tbd: diagram, etc.]--> </p> <p> The Controller file you create in this step contains one simple Action method. This simple navigational Action method forwards users to the index.jsp page. In the next step, you will create a more complex Action method. </p> </div> -<a name="N100FE"></a><a name="To+Create+a+Controller+File"></a> +<a name="N1010A"></a><a name="To+Create+a+Controller+File"></a> <h4>To Create a Controller File</h4> <div style="margin-left: 0 ; border: 2px"> <p>In this step you will create the Controller file in place in the Tomcat deployment directory.</p> @@ -468,8 +494,8 @@ <p>In a text editor (or your IDE of choice), open the file Controller.jpf.</p> <p>Edit Controller.jpf so it appears as follows.</p> <pre class="code"> -import org.apache.beehive.netui.pageflow.Forward; import org.apache.beehive.netui.pageflow.PageFlowController; +import org.apache.beehive.netui.pageflow.Forward; import org.apache.beehive.netui.pageflow.annotations.Jpf; @Jpf.Controller @@ -487,16 +513,14 @@ } </pre> </div> -<a name="N10125"></a><a name="To+Create+a+JSP+File"></a> +<a name="N10131"></a><a name="To+Create+a+JSP+File"></a> <h4>To Create a JSP File</h4> <div style="margin-left: 0 ; border: 2px"> <p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">index.jsp</span>.</p> <p>Edit index.jsp so it looks like the following.</p> <pre class="code"> <%@ page language="java" contentType="text/html;charset=UTF-8"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> <netui:html> <head> <title>index.jsp</title> @@ -510,67 +534,76 @@ </netui:html> </pre> </div> -<a name="N1013D"></a><a name="To+Create+the+WEB_INF+directory"></a> -<h4>To Create the WEB_INF directory</h4> +<a name="N10149"></a><a name="To+Create+the+WEB-INF+directory%2C+etc."></a> +<h4>To Create the WEB-INF directory, etc.</h4> <div style="margin-left: 0 ; border: 2px"> -<p> Open a command shell.</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\netui\ant</span> - +<p>In this step you will assemble the JARs and other supporting files for your Page Flow application. Most of these files are included in the WEB-INF directory. It includes JAR files with the JSP tag handler classes, Struts config files, etc. <!--[tbd: for a complete list see...]--></p> +<p></p> +<p>Using the command shell opened in the previous step, at the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\netui\ant</span> + </p> <p>At the command prompt, enter: <span class="codefrag">ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> - + </p> </div> -<a name="N1015F"></a><a name="Compile+the+Page+Flow"></a> +<a name="N10162"></a><a name="Compile+the+Page+Flow"></a> <h4>Compile the Page Flow</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> - +<p>You are now ready to compile the Page Flow.</p> +<p>Using the command shell opened in the previous step, at the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + </p> <p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> - + </p> +<p>You should see the following response in the command shell:</p> +<pre class="code">C:\beehive-src\trunk\test\ant>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\ +installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial +Buildfile: buildWebapp.xml + +build.webapp: +[xmlbeanbuild] Could not find any xsd or wsdl files to process. + [echo] ========== Complie Java source in WEB-INF/src ========== + [echo] netui-compiler.jar: C:\dev-apache\beehive\trunk/netui/build/lib/beehive-netui-compiler.j +ar + [echo] controls.jar: C:\dev-apache\beehive\trunk/controls/build/jars/controls.jar + [echo] ========== Generate and compile controls ========== + [mkdir] Created dir: C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutor +ial\WEB-INF\.tmpbeansrc + [echo] ========== Compile Page Flows ========== + [apt] Compiling 2 source files to C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps +\pageflow_tutorial\WEB-INF\classes + [echo] Copy all .properties files + [echo] Copy all .xml files</pre> </div> -<a name="N10172"></a><a name="To+Start+the+Tomcat+Server"></a> +<a name="N10180"></a><a name="To+Start+the+Tomcat+Server"></a> <h4>To Start the Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</span> + </p> -<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> </div> -<a name="N10188"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> +<a name="N1018D"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> - + </p> <p>You will be directed to the index.jsp page.</p> </div> </div> - -<a name="N10199"></a><a name="step_3"></a> + +<a name="N1019E"></a><a name="step_3"></a> <h3>Step 3: Navigation</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N1019F"></a><a name="Create+a+Destination+JSP+Page"></a> +<a name="N101A4"></a><a name="Create+a+Destination+JSP+Page"></a> <h4>Create a Destination JSP Page</h4> <div style="margin-left: 0 ; border: 2px"> <p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> <p>Edit page2.jsp so it looks like the following.</p> <pre class="code"> <%@ page language="java" contentType="text/html;charset=UTF-8"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> <netui:html> <head> <title>page2.jsp</title> @@ -584,16 +617,14 @@ </netui:html> </pre> </div> -<a name="N101B7"></a><a name="Create+a+Link+to+the+Destination+Page"></a> +<a name="N101BC"></a><a name="Create+a+Link+to+the+Destination+Page"></a> <h4>Create a Link to the Destination Page</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/index.jsp.</p> <p>Edit index.jsp so it appears as follows.</p> <pre class="code"> <%@ page language="java" contentType="text/html;charset=UTF-8"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> <netui:html> <head> <title>index.jsp</title> @@ -610,7 +641,7 @@ </netui:html> </pre> </div> -<a name="N101C9"></a><a name="Add+an+Action+Method+to+Handle+the+Link"></a> +<a name="N101CE"></a><a name="Add+an+Action+Method+to+Handle+the+Link"></a> <h4>Add an Action Method to Handle the Link</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf.</p> @@ -645,68 +676,49 @@ } </pre> </div> -<a name="N101DB"></a><a name="Compile+the+Page+Flow-N101D6"></a> +<a name="N101E0"></a><a name="Compile+the+Page+Flow-N101DA"></a> <h4>Compile the Page Flow</h4> <div style="margin-left: 0 ; border: 2px"> -<p>Open a command shell.</p> -<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> - +<p>Using the same command shell used in previous steps, at the command prompt, enter: <span class="codefrag">ant -f C:\beehive-src\trunk\test\ant\buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + </p> </div> -<a name="N10203"></a><a name="To+Start+the+Tomcat+Server-N101FE"></a> +<a name="N101ED"></a><a name="To+Start+the+Tomcat+Server-N101E7"></a> <h4>To Start the Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</span> + </p> -<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> </div> -<a name="N10219"></a><a name="To+Test+the+Page+Flow+Web+Application-N10214"></a> +<a name="N101FA"></a><a name="To+Test+the+Page+Flow+Web+Application-N101F4"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> - + </p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> </div> -<a name="N1022F"></a><a name="Shutdown+Tomcat+Server"></a> +<a name="N10210"></a><a name="Shutdown+Tomcat+Server"></a> <h4>Shutdown Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</span> + </p> </div> </div> - -<a name="N1023D"></a><a name="step_4"></a> + +<a name="N1021E"></a><a name="step_4"></a> <h3>Step 4: Submitting Data</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N10243"></a><a name="To+Create+a+Submission+Form"></a> +<a name="N10224"></a><a name="To+Create+a+Submission+Form"></a> <h4>To Create a Submission Form</h4> <div style="margin-left: 0 ; border: 2px"> <p>Edit the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/page2.jsp</span> so it appears as follows.</p> <pre class="code"> <%@ page language="java" contentType="text/html;charset=UTF-8"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> <netui:html> <head> <title>page2.jsp</title> @@ -727,11 +739,11 @@ </netui:html> </pre> </div> -<a name="N10255"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> +<a name="N10236"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> <h4>To Edit the Controller File to Handle the Submitted Data</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf</span> - + </p> <p>Edit Controller.jpf so it appears as follows.</p> <pre class="code"> @@ -765,7 +777,7 @@ @Jpf.Action( forwards = { - @Jpf.Forward(name = "success", path = "showData.jsp") + @Jpf.Forward(name = "success", path = "page2.jsp") } ) public Forward processData(ProcessDataForm form) @@ -803,60 +815,45 @@ } </pre> </div> -<a name="N1026A"></a><a name="Compile+the+Page+Flow-N10263"></a> +<a name="N1024B"></a><a name="Compile+the+Page+Flow-N10243"></a> <h4>Compile the Page Flow</h4> <div style="margin-left: 0 ; border: 2px"> -<p>Open a command shell.</p> -<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> - -</p> <p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> - + </p> +<p></p> </div> -<a name="N10292"></a><a name="To+Start+the+Tomcat+Server-N1028B"></a> +<a name="N1025A"></a><a name="To+Start+the+Tomcat+Server-N10252"></a> <h4>To Start the Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</span> </p> -<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> </div> -<a name="N102A8"></a><a name="To+Test+the+Page+Flow+Web+Application-N102A1"></a> +<a name="N10266"></a><a name="To+Test+the+Page+Flow+Web+Application-N1025E"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> - + </p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> +<p>Enter values in the Name and Age fields, and click Submit.</p> +<p>Notice the name and age values you entered are displayed in the Tomcat console shell.</p> </div> -<a name="N102BE"></a><a name="Shutdown+Tomcat+Server-N102B7"></a> +<a name="N10282"></a><a name="Shutdown+Tomcat+Server-N1027A"></a> <h4>Shutdown Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\shutdown.bat</span> + </p> </div> </div> - -<a name="N102CC"></a><a name="step_5"></a> + +<a name="N10290"></a><a name="step_5"></a> <h3>Step 5: Processing and Displaying Data</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N102D2"></a><a name="To+Process+the+Submitted+Data"></a> +<a name="N10296"></a><a name="To+Process+the+Submitted+Data"></a> <h4>To Process the Submitted Data</h4> <div style="margin-left: 0 ; border: 2px"> <p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p> @@ -875,15 +872,13 @@ } </pre> </div> -<a name="N102E1"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> +<a name="N102A5"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> <h4>To Create a JSP Page to Display Submitted Data</h4> <div style="margin-left: 0 ; border: 2px"> <p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/pageflow_tutorial. Edit showData.jsp so it appears as follows.</p> <pre class="code"> <%@ page language="java" contentType="text/html;charset=UTF-8"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> -<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> <netui:html> <head> <title>showData.jsp</title> @@ -896,64 +891,51 @@ </netui:html> </pre> </div> -<a name="N102F0"></a><a name="Compile+the+Page+Flow-N102E7"></a> +<a name="N102B4"></a><a name="Compile+the+Page+Flow-N102AA"></a> <h4>Compile the Page Flow</h4> <div style="margin-left: 0 ; border: 2px"> -<p>Open a command shell.</p> -<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> - +<p>At the command prompt, enter: <span class="codefrag">ant -f C:\beehive-src\trunk\test\ant\buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + </p> </div> -<a name="N10318"></a><a name="To+Start+the+Tomcat+Server-N1030F"></a> +<a name="N102C1"></a><a name="To+Start+the+Tomcat+Server-N102B7"></a> <h4>To Start the Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> - -</p> -<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</span> + </p> -<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> </div> -<a name="N1032E"></a><a name="To+Test+the+Page+Flow+Web+Application-N10325"></a> +<a name="N102CE"></a><a name="To+Test+the+Page+Flow+Web+Application-N102C4"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> <p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> - + </p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> +<p>Enter values in the Name and Age fields. Click the Submit button.</p> +<p>You will be forwarded to the showData.jsp page. Notice the values you entered are displayed.</p> </div> -<a name="N10344"></a><a name="Shutdown+Tomcat+Server-N1033B"></a> +<a name="N102EA"></a><a name="Shutdown+Tomcat+Server-N102E0"></a> <h4>Shutdown Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> - +<p>At the command prompt, enter: <span class="codefrag">C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\shutdown.bat</span> + </p> </div> </div> - -<a name="N10352"></a><a name="summary"></a> + +<a name="N102F8"></a><a name="summary"></a> <h3>Summary: Page Flow Tutorial</h3> <div style="margin-left: 0 ; border: 2px"> <p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p> <p>Concepts and Tasks Introduced in This Tutorial</p> -<p>[tbd: more detailed summary]</p> +<p> +<!--[tbd: more detailed summary]--> +</p> </div> - + <div class="attribution"></div> </div> </td><td width="10"><img width="10" height="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> Modified: incubator/beehive/trunk/site/build/site/reference.html ============================================================================== --- incubator/beehive/trunk/site/build/site/reference.html (original) +++ incubator/beehive/trunk/site/build/site/reference.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <a href="webservices.html">Web Services (JSR 181)</a> </li> - + +</ul> +</li> + + <li> <span class="sel"><font color="#ffcc00">Reference Docs</font></span> </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> Modified: incubator/beehive/trunk/site/build/site/webservices.html ============================================================================== --- incubator/beehive/trunk/site/build/site/webservices.html (original) +++ incubator/beehive/trunk/site/build/site/webservices.html Wed Oct 13 15:07:59 2004 @@ -98,74 +98,88 @@ <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> +<a href="building.html">Building Beehive</a> +</li> + <li> <font color="#CFDCED">Page Flows</font> <ul> - + <li> <a href="pageflow/tutorial_pageflow.html">Page Flow Tutorial</a> </li> - + + </ul> </li> - + <li> <font color="#CFDCED">Controls</font> <ul> - - + + <li> <a href="Controls.html">Control Programming</a> </li> - + </ul> </li> - + +<li> +<font color="#CFDCED">Web Services</font> +<ul> + + <li> <span class="sel"><font color="#ffcc00">Web Services (JSR 181)</font></span> </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> Added: incubator/beehive/trunk/site/build/site/wsm/tutorial_wsm.html ============================================================================== --- (empty file) +++ incubator/beehive/trunk/site/build/site/wsm/tutorial_wsm.html Wed Oct 13 15:07:59 2004 @@ -0,0 +1,1017 @@ +<!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>Beehive Page Flow Tutorial</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"> </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> +<a href="../building.html">Building Beehive</a> +</li> + +<li> +<font color="#CFDCED">Page Flows</font> +<ul> + +<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> +<span class="sel"><font color="#ffcc00">Web Services Tutorial</font></span> +</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">JPetStore Samples</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"> + + + </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"> + + + </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>Beehive Page Flow Tutorial</h1> +</td> +</tr> +</table> +<ul class="minitoc"> +<li> +<a href="#intro">Introduction To the Page Flow Tutorial</a> +<ul class="minitoc"> +<li> +<a href="#Tutorial+Goals">Tutorial Goals</a> +</li> +<li> +<a href="#Note+on+the+Current+State+of+the+Page+Flow+Tutorial">Note on the Current State of the Page Flow Tutorial</a> +</li> +</ul> +</li> +<li> +<a href="#step1">Step 1: Begin the Page Flow Tutorial</a> +<ul class="minitoc"> +<li></li> +<li> +<a href="#Download+and+Install+JDK5">Download and Install JDK5</a> +</li> +<li> +<a href="#Download+and+Install+SVN+%28Subversion+Source+Control%29">Download and Install SVN (Subversion Source Control)</a> +</li> +<li> +<a href="#Download+and+Install+Beehive">Download and Install Beehive</a> +</li> +<li> +<a href="#Install+ANT">Install ANT</a> +</li> +<li> +<a href="#Run+the+">Run the bootstrap Target</a> +</li> +</ul> +</li> +<li> +<a href="#step_2">Step 2: Create a New Page Flow Application</a> +<ul class="minitoc"> +<li> +<a href="#Introduction">Introduction</a> +</li> +<li> +<a href="#To+Create+a+Controller+File">To Create a Controller File</a> +</li> +<li> +<a href="#To+Create+a+JSP+File">To Create a JSP File</a> +</li> +<li> +<a href="#To+Create+the+WEB-INF+directory">To Create the WEB-INF directory</a> +</li> +<li> +<a href="#Compile+the+Page+Flow">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application">To Test the Page Flow Web Application</a> +</li> +</ul> +</li> +<li> +<a href="#step_3">Step 3: Navigation</a> +<ul class="minitoc"> +<li> +<a href="#Create+a+Destination+JSP+Page">Create a Destination JSP Page</a> +</li> +<li> +<a href="#Create+a+Link+to+the+Destination+Page">Create a Link to the Destination Page</a> +</li> +<li> +<a href="#Add+an+Action+Method+to+Handle+the+Link">Add an Action Method to Handle the Link</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N101D6">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N101FE">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10214">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_4">Step 4: Submitting Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Create+a+Submission+Form">To Create a Submission Form</a> +</li> +<li> +<a href="#To+Edit+the+Controller+File+to+Handle+the+Submitted+Data">To Edit the Controller File to Handle the Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N10263">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1028B">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N102A1">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N102B7">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#step_5">Step 5: Processing and Displaying Data</a> +<ul class="minitoc"> +<li> +<a href="#To+Process+the+Submitted+Data">To Process the Submitted Data</a> +</li> +<li> +<a href="#To+Create+a+JSP+Page+to+Display+Submitted+Data">To Create a JSP Page to Display Submitted Data</a> +</li> +<li> +<a href="#Compile+the+Page+Flow-N102E7">Compile the Page Flow</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server-N1030F">To Start the Tomcat Server</a> +</li> +<li> +<a href="#To+Test+the+Page+Flow+Web+Application-N10325">To Test the Page Flow Web Application</a> +</li> +<li> +<a href="#Shutdown+Tomcat+Server-N1033B">Shutdown Tomcat Server</a> +</li> +</ul> +</li> +<li> +<a href="#summary">Summary: Page Flow Tutorial</a> +</li> +</ul> + +<a name="N1000C"></a><a name="intro"></a> +<h3>Introduction To the Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10012"></a><a name="Tutorial+Goals"></a> +<h4>Tutorial Goals</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this tutorial, you will learn:</p> +<ul> + +<li>How to create a basic Page Flow web application</li> + +<li>How to coordinate user navigation with Forward methods</li> + +<li>How to handle data submission and processing with data binding and Form Beans</li> + +<li>How to create a user interface with the <neuti> JSP tag library</li> + +<li>How Page Flows help to separate data processing and data presentation</li> + +</ul> +</div> +<a name="N1002E"></a><a name="Note+on+the+Current+State+of+the+Page+Flow+Tutorial"></a> +<h4>Note on the Current State of the Page Flow Tutorial</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial is currently a work in progress. Unfinished portions of the tutorial are marked [tbd], standing for "to be done". Also the tutorial assumes that you are using a Windows machine, however, with a little common sense it is very easy to run through the tutorial on a Linux machine. For example, where the tutorial tells you to run FOO.cmd, instead run FOO.sh.</p> +<p>Please send any comments to Steve Hanson, at <span class="codefrag">[EMAIL PROTECTED]</span>.</p> +</div> +</div> + +<a name="N1003F"></a><a name="step1"></a> +<h3>Step 1: Begin the Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10045"></a> +<h4></h4> +<div style="margin-left: 0 ; border: 2px"></div> +<a name="N1004B"></a><a name="Download+and+Install+JDK5"></a> +<h4>Download and Install JDK5</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>If you do not have JDK5 installed on your machine, visit <a target="_blank" href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a> and download the latest version of JDK5.</p> +<p>Throughout this tutorial, it is assumed that you have JDK 5 installed at <span class="codefrag">C:\jdk1.5.0</span> +</p> +<p>[tbd: more detailed installation instructions]</p> +</div> +<a name="N10061"></a><a name="Download+and+Install+SVN+%28Subversion+Source+Control%29"></a> +<h4>Download and Install SVN (Subversion Source Control)</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Visit <a target="_blank" href="http://subversion.tigris.org">http://subversion.tigris.org</a> and install the SVN source control system.</p> +<p>[tbd: more detailed installation instructions]</p> +</div> +<a name="N10072"></a><a name="Download+and+Install+Beehive"></a> +<h4>Download and Install Beehive</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + Create a directory called <span class="codefrag">beehive-src</span> on your C: drive. Confirm that the the following directory structure exists: <span class="codefrag">C:/beehive-src</span>. This directory will store the Beehive source and all of your Beehive projects. </p> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd beehive-src</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">svn checkout http://svn.apache.org/repos/asf/incubator/beehive/trunk/</span> + +</p> +<p>Wait a few minutes while the Beehive source is downloaded to your local machine.</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +<a name="N1009A"></a><a name="Install+ANT"></a> +<h4>Install ANT</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a directory named <span class="codefrag">installed</span>at <span class="codefrag">C:/beehive-src/trunk/installed</span>.</p> +<p>Unzip the file <span class="codefrag">C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</span> into <span class="codefrag">C:/beehive-src/Beehive/installed</span>.</p> +<p>After the file has unzipped, confirm that the following directory structure exists: <span class="codefrag">C:/beehive-src/trunk/installed/apache-ant-1.6.2</span>.</p> +</div> +<a name="N100B9"></a><a name="Run+the+"></a> +<h4>Run the bootstrap Target</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">set BEEHIVE_HOME=C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant bootstrap</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">exit</span> + +</p> +</div> +</div> + +<a name="N100E8"></a><a name="step_2"></a> +<h3>Step 2: Create a New Page Flow Application</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N100EE"></a><a name="Introduction"></a> +<h4>Introduction</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> + In this step you will create a Controller file and a JSP page. A Controller file is a Java class (with the JPF file extension) that controls how your web application functions and what it does. The methods in the Controller file determines all of the major features of a web application: how users navigate from page to page, how user requests are handled, and how the web application accesses back-end resources. + </p> +<p> + Controller files control the features of a web application through the use of Action methods. An Action method may do something simple, such as forward a user from one JSP page to another; or it may do something complex, such as receive user input from a JSP page, calculate and/or retrieve other data based on the user input, and forward the user to a JSP page where the results are displayed. + </p> +<p> + The Controller file you create in this step contains one simple Action method. This simple navigational Action method forwards users to the index.jsp page. In the next step, you will create a more complex Action method. + </p> +</div> +<a name="N100FE"></a><a name="To+Create+a+Controller+File"></a> +<h4>To Create a Controller File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In this step you will create the Controller file in place in the Tomcat deployment directory.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps</span>, create a directory called <span class="codefrag">pageflow_tutorial</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file called <span class="codefrag">Controller.jpf</span>.</p> +<p>In a text editor (or your IDE of choice), open the file Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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 +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N10125"></a><a name="To+Create+a+JSP+File"></a> +<h4>To Create a JSP File</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">index.jsp</span>.</p> +<p>Edit index.jsp so it looks like the following.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>index.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + index.jsp + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N1013D"></a><a name="To+Create+the+WEB-INF+directory"></a> +<h4>To Create the WEB-INF directory</h4> +<div style="margin-left: 0 ; border: 2px"> +<p> Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\netui\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N1015F"></a><a name="Compile+the+Page+Flow"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10172"></a><a name="To+Start+the+Tomcat+Server"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10188"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +</div> +</div> + +<a name="N10199"></a><a name="step_3"></a> +<h3>Step 3: Navigation</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N1019F"></a><a name="Create+a+Destination+JSP+Page"></a> +<h4>Create a Destination JSP Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>In the directory <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> +<p>Edit page2.jsp so it looks like the following.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N101B7"></a><a name="Create+a+Link+to+the+Destination+Page"></a> +<h4>Create a Link to the Destination Page</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/index.jsp.</p> +<p>Edit index.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>index.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + index.jsp + </p> + <p> + <netui:anchor action="toPage2">Link to page2.jsp</netui:anchor> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N101C9"></a><a name="Add+an+Action+Method+to+Handle+the+Link"></a> +<h4>Add an Action Method to Handle the Link</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf.</p> +<p>Edit Controller.jpf so it appears as follows.</p> +<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; + +public class Controller + extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + protected Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } +} + </pre> +</div> +<a name="N101DB"></a><a name="Compile+the+Page+Flow-N101D6"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10203"></a><a name="To+Start+the+Tomcat+Server-N101FE"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N10219"></a><a name="To+Test+the+Page+Flow+Web+Application-N10214"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N1022F"></a><a name="Shutdown+Tomcat+Server"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N1023D"></a><a name="step_4"></a> +<h3>Step 4: Submitting Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N10243"></a><a name="To+Create+a+Submission+Form"></a> +<h4>To Create a Submission Form</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/page2.jsp</span> so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>page2.jsp</title> + <netui:base/> + </head> + <netui:body> + <p> + Welcome to page2.jsp! + </p> + <p> + <netui:form action="processData"> + <p>Name:<netui:textBox dataSource="actionForm.name"/> + <p>Age:<netui:textBox dataSource="actionForm.age"/> + <p><netui:button type="submit">Submit</netui:button> + </netui:form> + </p> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N10255"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> +<h4>To Edit the Controller File to Handle the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open the file <span class="codefrag">C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/pageflow_tutorial/Controller.jpf</span> + +</p> +<p>Edit Controller.jpf so it appears as follows.</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 org.apache.beehive.netui.pageflow.FormData; + [EMAIL PROTECTED] +public class Controller extends PageFlowController +{ + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="index.jsp") + } + ) + public Forward begin() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards={ + @Jpf.Forward(name="success", path="page2.jsp") + } + ) + public Forward toPage2() + { + return new Forward("success"); + } + + @Jpf.Action( + forwards = { + @Jpf.Forward(name = "success", path = "showData.jsp") + } + ) + public Forward processData(ProcessDataForm form) + { + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + return new Forward("success"); + } + + public static class ProcessDataForm extends FormData + { + private int age; + private String name; + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return this.name; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getAge() + { + return this.age; + } + } +} + </pre> +</div> +<a name="N1026A"></a><a name="Compile+the+Page+Flow-N10263"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10292"></a><a name="To+Start+the+Tomcat+Server-N1028B"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N102A8"></a><a name="To+Test+the+Page+Flow+Web+Application-N102A1"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N102BE"></a><a name="Shutdown+Tomcat+Server-N102B7"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N102CC"></a><a name="step_5"></a> +<h3>Step 5: Processing and Displaying Data</h3> +<div style="margin-left: 0 ; border: 2px"> +<a name="N102D2"></a><a name="To+Process+the+Submitted+Data"></a> +<h4>To Process the Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in red.</p> +<pre class="code"> [EMAIL PROTECTED]( + forwards = { + @Jpf.Forward( name = "success", path = "showData.jsp" ) + } +) +public Forward processData( ProcessDataForm form ) +{ + System.out.println("Name: " + form.name); + System.out.println("Age: " + form.age); + getRequest().setAttribute("data", form); + return new Forward("success"); +} + </pre> +</div> +<a name="N102E1"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> +<h4>To Create a JSP Page to Display Submitted Data</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Create a file named displayData.jsp in the directory [TOMCAT_HOME]/directory/pageflow_tutorial. Edit showData.jsp so it appears as follows.</p> +<pre class="code"> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>showData.jsp</title> + <netui:base/> + </head> + <netui:body> + <p>Name:<netui:span value="${requestScope.data.name}"/> + <p>Age:<netui:span value="${requestScope.data.age}"/> + </netui:body> +</netui:html> + </pre> +</div> +<a name="N102F0"></a><a name="Compile+the+Page+Flow-N102E7"></a> +<h4>Compile the Page Flow</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a command shell.</p> +<p>At the command prompt, enter: <span class="codefrag">set JAVA_HOME=C:\jdk1.5.0</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">beehiveEnv.cmd</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\test\ant</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\pageflow_tutorial</span> + +</p> +</div> +<a name="N10318"></a><a name="To+Start+the+Tomcat+Server-N1030F"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</span> + +</p> +<p>At the command prompt, enter: <span class="codefrag">startup.bat</span> + +</p> +<p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p> +</div> +<a name="N1032E"></a><a name="To+Test+the+Page+Flow+Web+Application-N10325"></a> +<h4>To Test the Page Flow Web Application</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Open a web browser and enter the following in the address bar: <span class="codefrag">http://localhost:8080/pageflow_tutorial</span> + +</p> +<p>You will be directed to the index.jsp page.</p> +<p>Click the link.</p> +<p>You will be directed to page2.jsp.</p> +</div> +<a name="N10344"></a><a name="Shutdown+Tomcat+Server-N1033B"></a> +<h4>Shutdown Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter: <span class="codefrag">shutdown.bat</span> + +</p> +</div> +</div> + +<a name="N10352"></a><a name="summary"></a> +<h3>Summary: Page Flow Tutorial</h3> +<div style="margin-left: 0 ; border: 2px"> +<p>This tutorial introduced you to the basics of building web applications with Beehive Page Flows.</p> +<p>Concepts and Tasks Introduced in This Tutorial</p> +<p>[tbd: more detailed summary]</p> +</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 © + 2004 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>
