You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2005/05/17 23:22:16 UTC

svn commit: r170667 - /incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml

Author: steveh
Date: Tue May 17 14:22:15 2005
New Revision: 170667

URL: http://svn.apache.org/viewcvs?rev=170667&view=rev
Log:
A fix for BEEHIVE-660: petstoreWeb Forrest documentation needs to be updated

Modified:
    incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml

Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml?rev=170667&r1=170666&r2=170667&view=diff
==============================================================================
--- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml (original)
+++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml Tue May 17 14:22:15 2005
@@ -14,16 +14,19 @@
 			<p>The Page Flows provide customers with web access to the 
 				Petstore. There are separate Page Flows for different customer 
 				activities: the 'shop' Page Flow (located at: 
-				<code>petstoreWeb/shop/</code>) lets users browse the catalog 
-				of pets, the 'checkout' Page Flow (petstoreWeb/checkout) lets 
+				<code>petstoreWeb/web/shop/</code>) lets users browse the catalog 
+				of pets, the 'checkout' Page Flow (petstoreWeb/web/checkout) lets 
 				users purchase selected items from a shopping cart, etc.</p>
+			<p>A web service (located at <code>petstoreWeb/ws/PestoreInventoryManager.java</code>) 
+				provides store managers access to the inventory.</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>). 
+				<code>petstoreWeb/src/org/apache/beehive/samples/petstore/controls/</code>). 
 				The Controls handle the backend data traffic and encapsulate 
 				the operations of the web application, such as retrieving data 
 				from a database and handling user orders.</p>
-
+            <p>Petstore runs against a Derby database implementation.  See the instructions below
+				for downloading Derby.</p>
 		<section id="dir_struct">
 			<title>Petstore Directory Structure</title>
 			<p>The table below describes the functions of the most important 
@@ -45,33 +48,39 @@
 				</tr>
 				<tr>
 					<td>
-						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../controller/AccountController.java</td>
+						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;org</td>
+					<td>
+						</td>
+				</tr>
+				<tr>
+					<td>
+						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../controller/AccountController.java</td>
 					<td>Class controls some of the internationalization settings for the site.</td>
 				</tr>
 				<tr>
 					<td>
-						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../controls</td>
+						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../controls</td>
 					<td>Beehive Controls encapsulating different 
 						functionalities, including handling user account data, 
 						catalogue data, and order processing.</td>
 				</tr>
 				<tr>
 					<td>
-						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../forms</td>
+						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../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>
-						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../model</td>
+						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../model</td>
 					<td>Java object classes (java beans) used to represent the basic 
 						types in the app:
 						addresses, orders, products, etc.</td>
 				</tr>
 				<tr>
 					<td>
-						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../resources</td>
+						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.../resources</td>
 					<td>Various .properties files</td>
 				</tr>
 				<tr>
@@ -177,6 +186,17 @@
 						<li><code>JAVA_HOME/bin</code></li>
 					</ul>
 			</section>
+			<section>
+				<title>Download Derby Implementation</title>
+				<p>The Petstore app runs against an imbedded Derby database.  You must
+					download a Derby implementation before building and running the Petstore.</p>
+				<p>Download a Derby distribution at: <a href="http://incubator.apache.org/derby/derby_downloads.html">http://incubator.apache.org/derby/derby_downloads.html</a></p>
+				
+			</section>
+			<section><title>(Optional) Dowload HTTPUnit Implementation</title>
+				<p>If you want to run the HTTPUnit tests associated with Petstore,
+					you must download a HTTPUnit implementation from: 
+					<a href="http://httpunit.sourceforge.net/">http://httpunit.sourceforge.net/</a></p></section>
 			<section id="copy_app">
 				<title>To Copy the Petstore Application to a Project 
 					Folder</title>
@@ -196,20 +216,29 @@
     petstoreWeb</source>
 			</section>
 			<section id="edit_properties_file"><title>Edit the <code>build.properties</code> File</title>
-				<p>In this section you will edit the <code>build.properties</code> file--the file
+				<p>Edit the <code>build.properties</code> file--the file
 					that sets the build-related properties for your web application.</p>
 				<p>Open the file <code>C:/beehive_projects/petstoreWeb/build.properties</code>
 					in a text editor.</p>
-				<p>Edit the file so that the <code>beehive.home</code> property points to the 
-					top-level folder of your beehive installation.  For example, if your beehive installation
-					resides at <code>C:/apache/apache-beehive-1.0</code>, then your <code>build.properties</code> file
-					would appear as follows.</p>
-				<source>beehive.home=<strong>C:/apache/apache-beehive-1.0</strong>
+				<p>At a minimum, you will need to edit the following two properties:</p>
+				<ul><li>beehive.home</li><li>derby.jar</li></ul>
+				<p>If you want to run the httpunit tests, you must set the following additional
+					property</p>
+				<ul><li>httpunit.dir</li></ul>
+					<p>The following example shows typical values for these three properties.
+					Note that the property <code>derby.jar</code> points to a JAR file, not
+					to a directory.</p>
+<source>beehive.home=<strong>C:/apache/apache-beehive-1.0</strong>
+
+context.path=petstoreWeb
 
 servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
 jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
 
-context.path=petstoreWeb</source>
+derby.jar=<strong>C:/apache/derby/derby.jar</strong>
+
+# Set this path in order to run HTTPUnit tests against the webapp
+httpunit.dir=<strong>C:/httpunit-1.6</strong></source>
 <note>Windows users must use forwardslashes (/) not backslashes (\) in the 
 	<code>build.properties</code> file.</note>
 
@@ -229,15 +258,23 @@
 			<section id="deploy">
 				<title>To Deploy to Tomcat</title>
 	<p>To deploy the web application, copy the WAR file to Tomcat's webapps directory.</p>
-	<source>copy C:\beehive_projects\petstoreWeb.war %CATALINA_HOME%\webapps</source>
+	<source>copy C:\beehive_projects\petstoreWeb.war %CATALINA_HOME%\webapps /Y</source>
 	
 			</section>
-			<section id="test">
+			<section id="running_url">
 				<title>Running Petstore</title>
 				<p>Visit the following URL:</p>
 				<p><a class="fork" href="http://localhost:8080/petstoreWeb">http://localhost:8080/petstoreWeb</a></p>
 			</section>
 		</section>
+			<section id="testing">
+				<title>Running the Petstore Tests</title>
+				<p>The Petstore app ships with associated junit tests.
+					Before running the tests, ensure that the web app is up and running, i.e,
+					accessible at http://localhost:8080/petstoreWeb.</p>
+				<p>To run the tests, enter the following Ant command:</p>
+				<source>ant -f test.run</source>
+			</section>
 	</body>
 	<footer>
 		<legal>Java, J2EE, and JCP are trademarks or registered trademarks of