Author: steveh
Date: Fri Oct 29 10:10:55 2004
New Revision: 55982
Added:
incubator/beehive/site/build.xml (contents, props changed)
Modified:
incubator/beehive/site/build/site/Controls.html
incubator/beehive/site/build/site/building.html
incubator/beehive/site/build/site/contributors.html
incubator/beehive/site/build/site/controls/tutorial_controls.html
incubator/beehive/site/build/site/downloads.html
incubator/beehive/site/build/site/faq.html
incubator/beehive/site/build/site/index.html
incubator/beehive/site/build/site/jpetstore.html
incubator/beehive/site/build/site/license.html
incubator/beehive/site/build/site/mailinglists.html
incubator/beehive/site/build/site/pageflow/guide.html
incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html
incubator/beehive/site/build/site/reference.html
incubator/beehive/site/build/site/webservices.html
incubator/beehive/site/build/site/wsm/sample_AddressBook.html
incubator/beehive/site/build/site/wsm/tutorial_wsm.html
incubator/beehive/site/src/documentation/content/xdocs/jpetstore.xml
incubator/beehive/site/src/documentation/content/xdocs/site.xml
Log:
Latest updates to the Forrest site: (1) updates to the petstore docs, (2)
adding build.xml file with target for fixing "inconsistent new lines" in the
forrest-generated HTML.
Added: incubator/beehive/site/build.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/site/build.xml Fri Oct 29 10:10:55 2004
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+ Forrest site build file. Before you checkin the forrest-generated HTML,
run the "fixeol" target.
+ If you do not, SVN may complain about "inconsistent new lines" in the
forrest-generated HTML.
+-->
+<project name="Beehive Build" default="usage" basedir=".">
+
+ <property environment="os"/>
+ <property file="../beehive.properties"/>
+
+ <target name="fixeol">
+ <fixcrlf srcDir="${os.BEEHIVE_HOME}/../site/build"
includes="**/*.html"/>
+ </target>
+
+</project>
Modified: incubator/beehive/site/build/site/Controls.html
==============================================================================
--- incubator/beehive/site/build/site/Controls.html (original)
+++ incubator/beehive/site/build/site/Controls.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/building.html
==============================================================================
--- incubator/beehive/site/build/site/building.html (original)
+++ incubator/beehive/site/build/site/building.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/contributors.html
==============================================================================
--- incubator/beehive/site/build/site/contributors.html (original)
+++ incubator/beehive/site/build/site/contributors.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/controls/tutorial_controls.html
==============================================================================
--- incubator/beehive/site/build/site/controls/tutorial_controls.html
(original)
+++ incubator/beehive/site/build/site/controls/tutorial_controls.html Fri Oct
29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="../jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="../wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/downloads.html
==============================================================================
--- incubator/beehive/site/build/site/downloads.html (original)
+++ incubator/beehive/site/build/site/downloads.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/faq.html
==============================================================================
--- incubator/beehive/site/build/site/faq.html (original)
+++ incubator/beehive/site/build/site/faq.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/index.html
==============================================================================
--- incubator/beehive/site/build/site/index.html (original)
+++ incubator/beehive/site/build/site/index.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/jpetstore.html
==============================================================================
--- incubator/beehive/site/build/site/jpetstore.html (original)
+++ incubator/beehive/site/build/site/jpetstore.html Fri Oct 29 10:10:55 2004
@@ -2,7 +2,7 @@
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Beehive Sample: PetStore</title>
+<title>Beehive Sample: Petstore</title>
<link type="text/css" href="skin/page.css" rel="stylesheet">
</head>
<body text="#000000" bgcolor="#FFFFFF">
@@ -252,33 +252,254 @@
<table class="title" summary="">
<tr>
<td valign="middle">
-<h1>Beehive Sample: PetStore</h1>
+<h1>Beehive Sample: Petstore</h1>
</td>
</tr>
</table>
<ul class="minitoc">
<li>
-<a href="#Anatomy+of+PetStore">Anatomy of PetStore</a>
+<a href="#Introduction">Introduction</a>
+</li>
+<li>
+<a href="#Petstore+Directory+Structure">Petstore Directory Structure</a>
+</li>
+<li>
+<a href="#Running+the+PetStore+Sample+on+Tomcat+5">Running the PetStore Sample
on Tomcat 5</a>
+<ul class="minitoc">
+<li>
+<a href="#Requirements">Requirements</a>
+</li>
+<li>
+<a href="#Setup">Setup</a>
+</li>
+<li>
+<a href="#Building%0A">Building</a>
+</li>
+<li>
+<a href="#Deploying+and+Running%0A">Deploying and Running</a>
+</li>
+</ul>
</li>
</ul>
-<a name="N1000C"></a><a name="Anatomy+of+PetStore"></a>
-<h3>Anatomy of PetStore</h3>
-<div style="margin-left: 0 ; border: 2px"></div>
- <!-- Just a sketch for now...will re-write from a distribution point
of view later
- <section>
- <title>Running the PetStore Sample</title>
- <p>To run the Petstore sample, you need to (1) add the Beehive
supporting JARs (and other files) to the sample's WEB-INF directory, (2)
compile the Petstore source, (3) deploy the sample to Tomcat, or some other
servlet container, and (4) start up your servlet container.</p>
- <p>(1) To add the supporting JARs to the WEB-INF directory, run
the following target:</p>
- <source>ant -f C:\beehive-src\trunk\netui\ant\webappTemplate.xml
-Dwebapp.dist.dir=C:\dev-apache\beehive\trunk\samples\petstoreWeb</source>
- <p>(2) To compile the sample source code, run the following
target:</p>
- <source>ant -f C:\beehive-src\trunk\test\ant\buildWebapp.xml
build.webapp
-Dwebapp.dir=C:\dev-apache\beehive\trunk\samples\petstoreWeb</source>
- <p>(3) To deploy the sample to Tomcat, copy the petstoreWeb folder
to Tomcat's webapps directory.
(C:\dev-apache\beehive\trunk\installed\jakarta-tomcat-5.0.25\webapps) :</p>
- <p>(4) To start up the Tomcat server, run the following:</p>
-
<source>C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</source>
- <p>Now visit http://localhost:8080/petstoreWeb/index.jsp to see
the Petstore application runnng.</p>
- </section>
- -->
+<a name="N1000C"></a><a name="Introduction"></a>
+<h3>Introduction</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>The Petstore sample is composed of Page Flows and Controls. The Page Flows
form the application's user interface, while the Controls coordinate the
+ applciation's back-end resources.</p>
+<p>The Page Flows are arranged in a modular fashion. There are separate Page
Flows for different user activities, for example the 'shop' Page Flow (located
at: <span class="codefrag">petstoreWeb/shop/</span>) lets users browse the
catalog of pets, the 'checkout' Page Flow (petstoreWeb/checkout) lets users
purchase selected items from a shopping cart, etc.</p>
+<p>Most of the Page Flows have associated Control files (located at: <span
class="codefrag">petstoreWeb/WEB-INF/src/org/apache/beehive/samples/petstore/controls/</span>).
The Controls handle the backend data traffic and encupsulate the operations
of the web application, such as retrieving data from a database and handling
user orders.</p>
+</div>
+
+<a name="N10022"></a><a name="Petstore+Directory+Structure"></a>
+<h3>Petstore Directory Structure</h3>
+<div style="margin-left: 0 ; border: 2px">
+<p>The table below describes the functions of the most important files in the
Petstore web application.</p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+
+<tr>
+
+<th colspan="1" rowspan="1">Directory</th><th colspan="1"
rowspan="1">Description</th>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1">petstoreWeb</td><td colspan="1" rowspan="1"></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> account</td><td
colspan="1" rowspan="1">Page Flow (=Controller.jpf + JSP files) user interface
for managing user accounts.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> auth</td><td colspan="1"
rowspan="1">Page Flow user interface for managing login and logout.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> checkout</td><td
colspan="1" rowspan="1">Page Flow user interface for managing the shopping
cart.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> search</td><td colspan="1"
rowspan="1">Page Flow user interface for searching the Petstore.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> shop</td><td colspan="1"
rowspan="1">Page Flow user interface for browsing the catalogue of pets.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> site</td><td colspan="1"
rowspan="1">Contains the Petstore "skin", including the CSS file, HTML
frameset, and template file.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> webappRoot</td><td
colspan="1" rowspan="1">[todo]</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1"> WEB-INF</td><td
colspan="1" rowspan="1">Contains configuration files for deployment,
validation, and security (web.xml).</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1"
rowspan="1"> lib</td><td
colspan="1" rowspan="1">JAR resources</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1"
rowspan="1"> src/.../controls</td><td
colspan="1" rowspan="1">Beehive Controls encapsulating different
functionalities, including handling user account data, catalogue data, and
order processing.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1"
rowspan="1"> src/.../forms</td><td
colspan="1" rowspan="1">Form Beans: each form bean is a server-side
representation of an HTML form appearing in the user interface.</td>
+
+</tr>
+
+<tr>
+
+<td colspan="1"
rowspan="1"> src/.../model</td><td
colspan="1" rowspan="1">Java object classes used by the Controls.</td>
+
+</tr>
+
+</table>
+</div>
+
+<a name="N100D6"></a><a name="Running+the+PetStore+Sample+on+Tomcat+5"></a>
+<h3>Running the PetStore Sample on Tomcat 5</h3>
+<div style="margin-left: 0 ; border: 2px">
+<a name="N100DC"></a><a name="Requirements"></a>
+<h4>Requirements</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>Beehive requires the following software to build and deploy
+the petstore:
+</p>
+<ul>
+
+<li>J2SE 5.0</li>
+
+<li>Ant 1.6.2</li>
+
+<li>Tomcat 5.x</li>
+
+</ul>
+</div>
+<a name="N100F2"></a><a name="Setup"></a>
+<h4>Setup</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>In the descriptions below, <span class="codefrag">BEEHIVE_HOME</span>
refers to the root of the
+Beehive distribution. For example, if Beehive is installed in:
+
+</p>
+<pre class="code"> c:\java\beehive-0.3alpha
+</pre>
+<p>the value of BEEHIVE_HOME would be:
+</p>
+<pre class="code">
%BEEHIVE_HOME%=c:\java\beehive-0.3alpha
+</pre>
+<p>Now, modify and run <span
class="codefrag">BEEHIVE_HOME/beehiveUser.cmd</span> to initialize your
+shell with some required environment variables including:
+</p>
+<ul>
+
+<li>
+<span class="codefrag">BEEHIVE_HOME</span>
+
+</li>
+
+<li>
+<span class="codefrag">JAVA_HOME</span>
+
+</li>
+
+<li>
+<span class="codefrag">ANT_HOME</span>
+
+</li>
+
+<li>
+<span class="codefrag">CATALINA_HOME</span>
+
+</li>
+
+</ul>
+<p>Running <span class="codefrag">beehiveUser.cmd</span> will also add Java
and Ant to your PATH.
+</p>
+<p>
+
+</p>
+</div>
+<a name="N10132"></a><a name="Building%0A"></a>
+<h4>Building
+</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>Note, if you are running on Unix, you will need to replace
+<span class="codefrag">%BEEHIVE_HOME%</span> with <span
class="codefrag">$BEEHIVE_HOME</span> below.
+</p>
+<p>To build the Petstore web application, run the following target:
+</p>
+<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
+ deploy.beehive.webapp.runtime build.webapp
+ -Dwebapp.dir=%BEEHIVE_HOME%\samples\petstoreWeb
+</pre>
+<p>This will copy the Beehive webapp runtime into
+</p>
+<pre class="code"> BEEHIVE_HOME/samples/petstoreWeb/WEB-INF/lib
+
+</pre>
+<p>and run the Beehive webapp build process on the petstoreWeb application.
+
+</p>
+</div>
+<a name="N10155"></a><a name="Deploying+and+Running%0A"></a>
+<h4>Deploying and Running
+</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>Petstore can be deployed to a running version of Tomcat in one
+of two ways:</p>
+<p>1) copy <span class="codefrag">BEEHIVE_HOME/samples/petstoreWeb/</span> to
<span class="codefrag">CATALINA_HOME/webapps</span>
+
+</p>
+<p>This will cause Tomcat to automatically deploy the webapp.
+</p>
+<p>2) Use Beehive's deploy Ant target to deploy the Petstore to Tomcat.
+</p>
+<p>This requires that the "manager" role be defined in
+<span class="codefrag">CATALINA_HOME/conf/tomcat-users.xml</span> with a
username / password of
+"manager" / "manager".
+</p>
+<p>Then, run the Ant command:
+</p>
+<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
+ deploy
+ -Dwebapp.dir=%BEEHIVE_HOME%\samples\petstoreWeb
+ -Dcontext.path=petstoreWeb</pre>
+<p>To hit the running application, use the URL:
+</p>
+<pre class="code"> http://localhost:8080/petstoreWeb/Controller.jpf
+
+</pre>
+</div>
+</div>
<div class="attribution"></div>
</div>
Modified: incubator/beehive/site/build/site/license.html
==============================================================================
--- incubator/beehive/site/build/site/license.html (original)
+++ incubator/beehive/site/build/site/license.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/mailinglists.html
==============================================================================
--- incubator/beehive/site/build/site/mailinglists.html (original)
+++ incubator/beehive/site/build/site/mailinglists.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/pageflow/guide.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/guide.html (original)
+++ incubator/beehive/site/build/site/pageflow/guide.html Fri Oct 29
10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="../jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="../wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html
(original)
+++ incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html Fri Oct
29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="../jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="../wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/reference.html
==============================================================================
--- incubator/beehive/site/build/site/reference.html (original)
+++ incubator/beehive/site/build/site/reference.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/webservices.html
==============================================================================
--- incubator/beehive/site/build/site/webservices.html (original)
+++ incubator/beehive/site/build/site/webservices.html Fri Oct 29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/build/site/wsm/sample_AddressBook.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/sample_AddressBook.html
(original)
+++ incubator/beehive/site/build/site/wsm/sample_AddressBook.html Fri Oct
29 10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="../jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<span class="sel"><font color="#ffcc00">WSM Sample: AddressBook</font></span>
Modified: incubator/beehive/site/build/site/wsm/tutorial_wsm.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/tutorial_wsm.html (original)
+++ incubator/beehive/site/build/site/wsm/tutorial_wsm.html Fri Oct 29
10:10:55 2004
@@ -171,6 +171,9 @@
<font color="#CFDCED">Samples</font>
<ul>
+<li>
+<a href="../jpetstore.html">Beehive Samples: JPetStore</a>
+</li>
<li>
<a href="../wsm/sample_AddressBook.html">WSM Sample: AddressBook</a>
Modified: incubator/beehive/site/src/documentation/content/xdocs/jpetstore.xml
==============================================================================
--- incubator/beehive/site/src/documentation/content/xdocs/jpetstore.xml
(original)
+++ incubator/beehive/site/src/documentation/content/xdocs/jpetstore.xml
Fri Oct 29 10:10:55 2004
@@ -6,26 +6,152 @@
</header>
<body>
<section>
- <title>Anatomy of Petstore</title>
- <p>The Beehive Petstore Sample is a web application that can be
deployed to any servlet container that supports [tbd], such as Tomcat 5.</p>
+ <title>Introduction</title>
<p>The Petstore sample is composed of Page Flows and Controls.
The Page Flows form the application's user interface, while the Controls
coordinate the
applciation's back-end resources.</p>
- <p>The Page Flows are arranged in a modular fashion, There are
separated Page Flows for different user activities: the 'shop' Page Flow
(petstoreWeb/shop/) lets users browse the catalog of pets, while the 'checkout'
Page Flow (petstoreWeb/checkout)</p>
+ <p>The Page Flows are arranged in a modular fashion. There are
separate Page Flows for different user activities, for example the 'shop' Page
Flow (located at: <code>petstoreWeb/shop/</code>) lets users browse the catalog
of pets, the 'checkout' Page Flow (petstoreWeb/checkout) lets users purchase
selected items from a shopping cart, etc.</p>
+ <p>Most of the Page Flows have associated Control files (located at:
<code>petstoreWeb/WEB-INF/src/org/apache/beehive/samples/petstore/controls/</code>).
The Controls handle the backend data traffic and encupsulate the operations
of the web application, such as retrieving data from a database and handling
user orders.</p>
</section>
- <!-- Just a sketch for now...will re-write from a distribution point
of view later
<section>
- <title>Running the PetStore Sample</title>
- <p>To run the Petstore sample, you need to (1) add the Beehive
supporting JARs (and other files) to the sample's WEB-INF directory, (2)
compile the Petstore source, (3) deploy the sample to Tomcat, or some other
servlet container, and (4) start up your servlet container.</p>
- <p>(1) To add the supporting JARs to the WEB-INF directory, run
the following target:</p>
- <source>ant -f C:\beehive-src\trunk\netui\ant\webappTemplate.xml
-Dwebapp.dist.dir=C:\dev-apache\beehive\trunk\samples\petstoreWeb</source>
- <p>(2) To compile the sample source code, run the following
target:</p>
- <source>ant -f C:\beehive-src\trunk\test\ant\buildWebapp.xml
build.webapp
-Dwebapp.dir=C:\dev-apache\beehive\trunk\samples\petstoreWeb</source>
- <p>(3) To deploy the sample to Tomcat, copy the petstoreWeb folder
to Tomcat's webapps directory.
(C:\dev-apache\beehive\trunk\installed\jakarta-tomcat-5.0.25\webapps) :</p>
- <p>(4) To start up the Tomcat server, run the following:</p>
-
<source>C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</source>
- <p>Now visit http://localhost:8080/petstoreWeb/index.jsp to see
the Petstore application runnng.</p>
+ <title>Petstore Directory Structure</title>
+ <p>The table below describes the functions of the most important files
in the Petstore web application.</p>
+ <table>
+ <tr>
+ <th>Directory</th><th>Description</th>
+ </tr>
+ <tr>
+ <td>petstoreWeb</td><td></td>
+ </tr>
+ <tr>
+ <td> account</td><td>Page Flow
(=Controller.jpf + JSP files) user interface for managing user accounts.</td>
+ </tr>
+ <tr>
+ <td> auth</td><td>Page Flow user interface
for managing login and logout.</td>
+ </tr>
+ <tr>
+ <td> checkout</td><td>Page Flow user
interface for managing the shopping cart.</td>
+ </tr>
+ <tr>
+ <td> search</td><td>Page Flow user
interface for searching the Petstore.</td>
+ </tr>
+ <tr>
+ <td> shop</td><td>Page Flow user interface
for browsing the catalogue of pets.</td>
+ </tr>
+ <tr>
+ <td> site</td><td>Contains the Petstore
"skin", including the CSS file, HTML frameset, and template file.</td>
+ </tr>
+ <tr>
+ <td> webappRoot</td><td>[todo]</td>
+ </tr>
+ <tr>
+ <td> WEB-INF</td><td>Contains configuration
files for deployment, validation, and security (web.xml).</td>
+ </tr>
+ <tr>
+
<td> lib</td><td>JAR
resources</td>
+ </tr>
+ <tr>
+
<td> src/.../controls</td><td>Beehive
Controls encapsulating different functionalities, including handling user
account data, catalogue data, and order processing.</td>
+ </tr>
+ <tr>
+
<td> src/.../forms</td><td>Form
Beans: each form bean is a server-side representation of an HTML form appearing
in the user interface.</td>
+ </tr>
+ <tr>
+
<td> src/.../model</td><td>Java
object classes used by the Controls.</td>
+ </tr>
+</table>
+ </section>
+ <section>
+ <title>Running the PetStore Sample on Tomcat 5</title>
+ <section>
+ <title>Requirements</title>
+ <p>Beehive requires the following software to build and deploy
+the petstore:
+</p>
+ <ul>
+ <li>J2SE 5.0</li>
+ <li>Ant 1.6.2</li>
+ <li>Tomcat 5.x</li>
+ </ul>
+ </section>
+ <section>
+ <title>Setup</title>
+ <p>In the descriptions below, <code>BEEHIVE_HOME</code> refers
to the root of the
+Beehive distribution. For example, if Beehive is installed in:
+
+</p>
+ <source> c:\java\beehive-0.3alpha
+</source>
+ <p>the value of BEEHIVE_HOME would be:
+</p>
+ <source>
%BEEHIVE_HOME%=c:\java\beehive-0.3alpha
+</source>
+ <p>Now, modify and run
<code>BEEHIVE_HOME/beehiveUser.cmd</code> to initialize your
+shell with some required environment variables including:
+</p>
+ <ul>
+ <li><code>BEEHIVE_HOME</code>
+</li>
+ <li><code>JAVA_HOME</code>
+</li>
+ <li><code>ANT_HOME</code>
+</li>
+ <li><code>CATALINA_HOME</code>
+</li>
+ </ul>
+ <p>Running <code>beehiveUser.cmd</code> will also add Java and
Ant to your PATH.
+</p>
+ <p>
+</p>
+ </section>
+ <section>
+ <title>Building
+</title>
+ <p>Note, if you are running on Unix, you will need to replace
+<code>%BEEHIVE_HOME%</code> with <code>$BEEHIVE_HOME</code> below.
+</p>
+ <p>To build the Petstore web application, run the following
target:
+</p>
+ <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
+ deploy.beehive.webapp.runtime build.webapp
+ -Dwebapp.dir=%BEEHIVE_HOME%\samples\petstoreWeb
+</source>
+ <p>This will copy the Beehive webapp runtime into
+</p>
+ <source> BEEHIVE_HOME/samples/petstoreWeb/WEB-INF/lib
+
+</source>
+ <p>and run the Beehive webapp build process on the petstoreWeb
application.
+
+</p>
+ </section>
+ <section>
+ <title>Deploying and Running
+</title>
+ <p>Petstore can be deployed to a running version of Tomcat in
one
+of two ways:</p>
+ <p>1) copy <code>BEEHIVE_HOME/samples/petstoreWeb/</code> to
<code>CATALINA_HOME/webapps</code>
+ </p>
+ <p>This will cause Tomcat to automatically deploy the webapp.
+</p>
+ <p>2) Use Beehive's deploy Ant target to deploy the Petstore
to Tomcat.
+</p>
+ <p>This requires that the "manager" role be defined in
+<code>CATALINA_HOME/conf/tomcat-users.xml</code> with a username / password of
+"manager" / "manager".
+</p>
+ <p>Then, run the Ant command:
+</p>
+ <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
+ deploy
+ -Dwebapp.dir=%BEEHIVE_HOME%\samples\petstoreWeb
+ -Dcontext.path=petstoreWeb</source>
+ <p>To hit the running application, use the URL:
+</p>
+ <source> http://localhost:8080/petstoreWeb/Controller.jpf
+
+</source>
+ </section>
</section>
- -->
</body>
<footer>
<legal>Java, J2EE, and JCP are trademarks or registered trademarks of
Sun Microsystems, Inc. in the United States and other countries.<br/>
Modified: incubator/beehive/site/src/documentation/content/xdocs/site.xml
==============================================================================
--- incubator/beehive/site/src/documentation/content/xdocs/site.xml
(original)
+++ incubator/beehive/site/src/documentation/content/xdocs/site.xml Fri Oct
29 10:10:55 2004
@@ -23,7 +23,7 @@
<jsr181 label="Web Services (JSR 181)" href="webservices.html"/>
</wsm>
<samples label="Samples">
- <!--<jpetstore label="Beehive Samples: JPetStore"
href="jpetstore.html"/>-->
+ <jpetstore label="Beehive Samples: JPetStore"
href="jpetstore.html"/>
<jsr181 label="WSM Sample: AddressBook"
href="wsm/sample_AddressBook.html"/>
</samples>
<ref label="Reference Docs" href="reference.html"/>