You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/06 00:09:19 UTC

svn commit: r168442 - /incubator/beehive/trunk/samples/petstoreWeb/README

Author: ekoneil
Date: Thu May  5 15:09:18 2005
New Revision: 168442

URL: http://svn.apache.org/viewcvs?rev=168442&view=rev
Log:
Fixup the readme to reflect recent changes.

BB: self
DRT: none


Modified:
    incubator/beehive/trunk/samples/petstoreWeb/README

Modified: incubator/beehive/trunk/samples/petstoreWeb/README
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/petstoreWeb/README?rev=168442&r1=168441&r2=168442&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/petstoreWeb/README (original)
+++ incubator/beehive/trunk/samples/petstoreWeb/README Thu May  5 15:09:18 2005
@@ -3,21 +3,19 @@
 
 Requirements
 ============
-
 The following software is required to build and deploy the pet store:
-
   - Java 5
   - Ant 1.6.2
-  - J2EE Container
-
-Setup
-=====
+  - Servlet or J2EE Container
+  - The Apache Derby 10.0.x JAR
 
+Installing Dependencies
+=======================
 1) Java 5
 
   Download: http://java.sun.com/j2se/1.5.0/download.jsp
 
-  Install Java 5 and set the JAVA_HOME environment variable to
+Install Java 5 and set the JAVA_HOME environment variable to
 refernce the JDK install directory.  Ensure that $JAVA_HOME/bin is
 available in your $PATH.
 
@@ -25,60 +23,83 @@
 
   Download: http://ant.apache.org/bindownload.cgi
 
-  Ant 1.6.2 is the minimum version required to build Beehive.  Install
-Ant 1.6.2 and set the ANT_HOME environment variable to reference the
-Ant install directory.  Ensure that $ANT_HOME/bin is available in your
-$PATH.
+Ant 1.6.2 is the minimum version required by the Beehive build infrastructure.  
+Install Ant 1.6.2 and set the ANT_HOME environment variable to reference the Ant 
+install directory.  Ensure that $ANT_HOME/bin is available in your $PATH.
 
 3) J2EE Container
 
-  A J2EE container is required; since the petstoreWeb is a J2EE web application
-it will run fine on Tomcat 5.x.
+  A Servlet or J2EE container is required.  The petstoreWeb will run well on 
+Tomcat 5.x.
 
-4) Derby 10.0
+4) Derby 10.0.x
 
    Download: http://incubator.apache.org/derby/derby_downloads.html
 
-   Copy derby.jar to the WEB-INF\lib directory of the petstoreWeb sample.
+Copy derby.jar to the samples/petstoreWeb/lib directory.
    
-5) Derby DB Location
+5) Specifying the Derby database location
 
-   Modify WEB-INF/src/org/apache/beehive/samples/petstore/controls/data/DBProperties.java
-in the petstoreWeb to set the location for the Derby petstore database. By default, this location 
-is: "d:/Apache/Derby/petDB". Most users will want to change this.
+Modify petstoreWeb/src/org/apache/beehive/samples/petstore/controls/data/DBProperties.java
+in the petstoreWeb to set the location for the Derby petstore database. By default, 
+this location is: "d:/Apache/Derby/petDB". Most users will need to change this.
 	
 Building
 ========
+The samples/petstoreWeb is structured as:
+
+samples/
+  petstoreWeb/
+    build.xml
+    build.properties
+    src/
+      Contains the .java code for Beehive controls, form beans, and other sources / properties files
+    web/
+      Contains JSPs, .java Page Flows, images, and other web content.
+
+When the webapp is built, a build/ directory is created and the Beehive runtime
+is added to build/WEB-INF/lib.  Then, web content is copied from web/ to build/
+and the Beehive source artifacts (controls and Page Flows) are built into WEB-INF/classes.
+
+Once the webapp is built, the build/ directory contains the complete, exploded webapp 
+and can be deployed to a Servlet container.
 
-The petstoreWeb stores its Ant build files in the WEB-INF/src directory.  The steps
-below expect to be run from this directory.
+The Ant build files for the petstore are stored in the petstoreWeb/ directory.  In the 
+instructions below, "$>" represents the command prompt in the samples/petstoreWeb/.
 
-The first time you build the Petstore web application, you will need to
-pull in the Beehive runtime libraries.  Use the following target once:
+The first time you build the Petstore web application, the Beehive runtime libraries
+will need to be copied into the webapp with:
 
-ant deploy-beehive
+  $> ant deploy-beehive
 
-To build the Petstore web application, run the following target from the petstore's WEB-INF/src
-directory:
+Then, the webapp can be built with:
 
-ant build
+  $> ant build
+
+To clean the webapp, run:
+
+  $> ant clean
+
+To build a .war file for the webapp, run:
+
+  $> ant war
 
 Deploying and Running
 =====================
-
 Use your container's standard deployment practice to deploy the Web
 application found in samples/petstoreWeb.
 
-If you used petstoreWeb as the context root, then you should be able to
-hit the Petstore web application, use the URL:
+The default context path for petstoreWeb is "petstoreWeb".  When deployed to the server, 
+the web appliciation should be available at the URL:
 
-  http://<host>:<port>/petstoreWeb/Controller.jpf
+  http://<host>:<port>/petstoreWeb/
 
-For example, if you are using Tomcat 5.0.25 for you J2EE container, you
-can deploy using the following:
+If you are using Tomcat 5.0.x for you J2EE container, you can deploy using the following:
 
-cd <BeehiveRoot>\samples\petstoreWeb
-jar -cf %CATALINA_HOME%\webapps\petstoreWeb.war *
+  $> cd <BeehiveRoot>\samples\petstoreWeb
+  $> ant war
+  $> cp petstoreWeb.war $CATALINA_HOME\webapps
 
-Check the Beehive Wiki for information about deploying to other application containers.
+Check the Beehive Wiki or your application container's documentation for information about
+deploying to other application containers.