Author: steveh
Date: Mon Feb 14 13:09:56 2005
New Revision: 153845
URL: http://svn.apache.org/viewcvs?view=rev&rev=153845
Log:
Updating the samples related docs.
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/sample_controls-db.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/sample_netui-blank.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_AddressBook.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_Dashboard.xml
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/sample_controls-db.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/sample_controls-db.xml?view=diff&r1=153844&r2=153845
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/sample_controls-db.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/sample_controls-db.xml
Mon Feb 14 13:09:56 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"http://forrest.apache.org/dtd/document-v13.dtd">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Database Control Sample</title>
@@ -84,7 +84,7 @@
<section>
<title>The EmployeeWS Sample</title>
-<p>Notice that the sample <link
href="../wsm/sample_AddressBook.html">EmployeeWS</link> uses this same
technique (subclassing DatabaseControl) for database access. The EmployeeWS
sample is a database control exposed as a web service. The exposed database
control, EmployeeDBControl, is a subclass of DatabaseControl (archived in
<code>dbControl.jar</code>).</p>
+<p>Notice that the sample <a
href="../wsm/sample_AddressBook.html">EmployeeWS</a> uses this same technique
(subclassing DatabaseControl) for database access. The EmployeeWS sample is a
database control exposed as a web service. The exposed database control,
EmployeeDBControl, is a subclass of DatabaseControl (archived in
<code>dbControl.jar</code>).</p>
<source>public interface EmployeeDBControl extends DatabaseControl
{
...
@@ -97,12 +97,13 @@
<section>
<title>Building the Database Control</title>
- <p>To build <code>dbControl.jar</code> run the following Ant command:</p>
+ <p>To build <code>dbControl.jar</code> run the following Ant command.</p>
+ <p><strong>Note:</strong> replace
<code><BeehiveRoot></code> with the path to the
+ top level folder of your Beehive
installation, for example,
+
<code>C:\apache\apache-beehive-1.0</code>. </p>
<p>On Windows:</p>
- <p><code>ant -f %BEEHIVE_HOME%\samples\controls-db\build.xml
build</code>.</p>
- <p>On Unix:</p>
- <p><code>ant -f $BEEHIVE_HOME\samples\controls-db\build.xml
build</code>.</p>
- <p>This produces the file <code>dbControl.jar</code> in the directory
<code>BEEHIVE_HOME/samples/controls-db/build</code>.</p>
+ <source>ant -f <strong><BeehiveRoot></strong>\controls-db\build.xml
build</source>
+ <p>This produces the file <code>dbControl.jar</code> in the directory
<code><BeehiveRoot>/samples/controls-db/build</code>.</p>
<p></p>
</section> </body>
<footer>
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?view=diff&r1=153844&r2=153845
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/jpetstore.xml
Mon Feb 14 13:09:56 2005
@@ -1,191 +1,212 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
"http://forrest.apache.org/dtd/document-v20.dtd">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+ "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
- <header>
- <title>Beehive Sample: Petstore</title>
- </header>
- <body>
- <section>
- <title>Introduction</title>
- <p>The Petstore sample demonstrates how to integrate all three
Beehive technologies (Page Flows, Controls and Web Services) in one
application.</p>
- <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 users
purchase selected items from a shopping cart, etc.</p>
- <p>The Web Service provides employee access to the Petstore.
Through the web service (located at
<code>petstoreWeb/WEB-INF/src/PetstoreInventoryManager.jws</code>) employees
can update the current inventory and prices displayed to customers through the
web site. A Swing client for the web service is provided in the sample <a
href="http://incubator.apache.org/beehive/wsm/sample_Dashboard.html">Petstore
Dashboard</a>. </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>
- <section>
- <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/>
- </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> lib/PetstoreInventoryManager.jws</td>
- <td>Web service for employee access to the store</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. (The Beehive binary distribution can be downloaded from
<a class="fork"
href="http://cvs.apache.org/dist/incubator/beehive/v1.0-alpha/bin/">http://cvs.apache.org/dist/incubator/beehive/v1.0-alpha/bin/</a>.)
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>(Optional) Copy the Petstore Application to a Project
Folder</title>
- <p>If you want to keep your Beehive distribution directory
pristine, you might consider copying the <code>petstoreWeb</code> folder to
another location before proceeding. The following instructions assume that you
have copied the <code>petstoreWeb</code> folder into the directory
<code>C:/beehive_projects</code>.</p>
- </section>
- <section>
- <title>Copy the Runtime Resources and Compile
-</title>
- <p>To copy the runtime JARs into the application source and
compile, run the following target:
-</p>
- <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
- -Dwebapp.dir=C:/beehive_projects/petstoreWeb
- deploy.beehive.webapp.runtime
- build.webapp</source>
- <p>This will copy the Beehive webapp runtime JARs into </p>
- <source> C:/beehive_projects/petstoreWeb/WEB-INF/lib</source>
- <p>and run the Beehive webapp build process on the petstoreWeb
application.</p>
- </section>
- <section>
- <title>Start Tomcat</title>
- <p>To start Tomcat, run the following command:</p>
- <source>%CATALINA_HOME%\bin\startup.bat</source>
- <p>You can also start Tomcat by running the following Ant
command, provided in the buildWebapp.xml file:</p>
- <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
start</source>
- <p><strong>Note:</strong> if you use the second of these
methods for starting Tomcat, you will have to enter Ctrl+C into the command
shell to enter any further commands.</p>
- </section>
- <section>
- <title>Deploying to Tomcat 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=C:\beehive_projects\petstoreWeb
- -Dcontext.path=petstoreWeb</source>
- <p>If petstoreWeb is already deployed on the server, run the undeploy
target first.</p>
- <source>ant
- -f %BEEHIVE_HOME%\ant\buildWebapp.xml
- undeploy
+ <header>
+ <title>Beehive Sample: Petstore</title>
+ </header>
+ <body>
+ <section id="intro">
+ <title>Introduction</title>
+ <p>The Petstore sample demonstrates how to integrate
all three
+ Beehive technologies (Page Flows, Controls and
Web Services) in
+ one application.</p>
+ <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
+ users purchase selected items from a shopping
cart, etc.</p>
+ <p>The Web Service provides employee access to the
Petstore.
+ Through the web service (located at
+
<code>petstoreWeb/WEB-INF/src/PetstoreInventoryManager.jws</code>)
+ employees can update the current inventory and
prices displayed
+ to customers through the web site. A Swing
client for the web
+ service is provided in the sample <a
+
href="http://incubator.apache.org/beehive/wsm/sample_Dashboard.html">Petstore
+ Dashboard</a>. </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>
+ <section id="dir_struct">
+ <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/>
+ </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>
+
lib/PetstoreInventoryManager.jws</td>
+ <td>Web service for employee access to
the store</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 id="running">
+ <title>Running the PetStore Sample on Tomcat 5</title>
+ <p>The following explains how to run the Petstore
sample on Tomcat 5. The Petstore sample
+ will run on other web containers, but we have
chosen Tomcat 5 for convenience.</p>
+ <section id="set_up">
+ <title>To Set up the Environment</title>
+ <p>Before proceeding, complete all of the necessary and
optional steps in the
+ following topic:
+ <a class="fork"
href="../setup.html">Beehive Installation and Setup</a></p>
+ <p>Open a command shell and confirm that you
have the following variables
+ have been set:</p>
+ <ul>
+ <li><code>ANT_HOME</code></li>
+ <li><code>JAVA_HOME</code></li>
+
<li><code>CATALINA_HOME</code></li>
+ </ul>
+ <p>Also ensure that the following
elements are on your <code>PATH</code>:</p>
+ <ul>
+
<li><code>ANT_HOME/bin</code></li>
+
<li><code>JAVA_HOME/bin</code></li>
+ </ul>
+ </section>
+ <section id="copy_app">
+ <title>To Copy the Petstore Application to a
Project
+ Folder</title>
+ <p>To keep your Beehive distribution directory
+ pristine, you should copy the
+ <code>petstoreWeb</code> folder to
another location before
+ proceeding. The following instructions
assume that you have
+ copied the folder
<code>petstoreWeb</code> into the
+ directory
<code>C:/beehive_projects</code>,
+ resulting in the following directory
structure.</p>
+ <source>C:
+ beehive_projects
+ petstoreWeb</source>
+ </section>
+ <section id="copy_runtime">
+ <title>To Copy the Runtime Resources</title>
+ <p>The Petstore application is distributed
without the Beehive runtime JAR
+ files it needs to run.
+ To copy the runtime JARs into the
Petstore app,
+ run the following Ant command. </p>
+ <p><strong>Note:</strong> replace
<code><BeehiveRoot></code> with the path to the
+ top level folder of your Beehive
installation, for example,
+
<code>C:\apache\apache-beehive-1.0</code>. </p>
+ <source>ant
+ -f <strong><BeehiveRoot></strong>\ant\webappRuntimeCore.xml
-Dwebapp.dir=C:\beehive_projects\petstoreWeb
- -Dcontext.path=petstoreWeb</source>
- <p>To see the running application, visit the URL:
-</p>
- <p> <a href="
http://localhost:8080/petstoreWeb/Controller.jpf">http://localhost:8080/petstoreWeb/Controller.jpf</a></p>
- </section>
- </section>
- </body>
- <footer>
- <legal>Java, J2EE, and JCP are trademarks or registered trademarks of
Sun Microsystems, Inc. in the United States and other countries.<br/>
- © 2004, Apache Software Foundation
- </legal>
- </footer>
-</document>
+ deploy.beehive.webapp.runtime</source>
+ <p>This will copy the Beehive webapp runtime
JARs into the following location.</p>
+ <source>
C:/beehive_projects/petstoreWeb/WEB-INF/lib</source>
+ </section>
+ <section id="compile">
+ <title>To Compile the Petstore
Application</title>
+ <p>To compile the Petstore app, enter the following Ant
command:</p>
+<source>ant
+ -f <strong><BeehiveRoot></strong>\ant\buildWebapp.xml
+ -Dwebapp.dir=C:\beehive_projects\petstoreWeb
+ build</source>
+
+ </section>
+ <section id="start_tomcat">
+ <title>To Start Tomcat</title>
+ <p>To start Tomcat, run the following
command:</p>
+ <source>%CATALINA_HOME%\bin\startup.bat</source>
+ </section>
+ <section id="deploy">
+ <title>To Deploying to Tomcat</title>
+ <p>To deploy the web application, click the following link. We
recommend that you open the
+ link in a new browser window. Each time you want to redeploy
the application,
+ simply refresh the browser.</p>
+ <p>This method of application deployment assumes that you have added
the <code>manager</code>
+ role to your Tomcat installation. For instructions on adding
the <code>manager</code> role,
+ see <a class="fork" href="../setup.html#optional">Beehive
Installation and Setup</a>.</p>
+ <p class="quote">
+ <a class="fork"
href="http://localhost:8080/manager/deploy?path=/petstoreWeb&war=file:C:/beehive_projects/petstoreWeb&update=true">http://localhost:8080/manager/deploy?path=/petstoreWeb&war=file:C:/pageflow_projects/petstoreWeb&update=true</a>
+ </p>
+ <p>If you are prompted for a username/password, enter:
<code>manager/manager</code></p>
+ <p>(For an explanation of this method of deploying an application to
Tomcat,
+ see the Tomcat 5 documentation:
+ <a class="fork"
href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Deploy%20A%20New%20Application%20from%20a%20Local%20Path">Deploy
A New Application from a Local Path</a>)</p>
+ </section>
+ <section id="test">
+ <title>Running</title>
+ <p><a class="fork"
href="http://localhost:8080/petstoreWeb">http://localhost:8080/petstoreWeb</a></p>
+ </section>
+ </section>
+ </body>
+ <footer>
+ <legal>Java, J2EE, and JCP are trademarks or registered
trademarks of
+ Sun Microsystems, Inc. in the United States and other
+ countries.<br/> © 2004, Apache Software Foundation
</legal>
+ </footer>
+</document>
\ No newline at end of file
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/sample_netui-blank.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/sample_netui-blank.xml?view=diff&r1=153844&r2=153845
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/sample_netui-blank.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/sample_netui-blank.xml
Mon Feb 14 13:09:56 2005
@@ -1,57 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"http://forrest.apache.org/dtd/document-v13.dtd">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+ "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
- <header>
- <title>Page Flow Project Template</title>
- </header>
- <body>
- <section id="intro">
- <title>Introduction</title>
-<p>Use the "blank" Page Flow sample (located at
<code>BEEHIVE_HOME/samples/netui-blank</code>) as a template for building your
own Page Flow applications.
-The sample contains everything needed in a basic Page Flow application, except
for the runtime and <netui> tag library JAR files.
-</p>
- </section>
- <section>
- <title>Using the Page Flow Web App Template</title>
- <p>The following instruction assume that you have completed the basic
Beehive set up procedure at <fork href="../setup.html">Set Up the Dev
Environment</fork>.</p>
- <p>To use the template, (1) copy the contents of
<code>BEEHIVE_HOME/samples/netui-blank</code> into your project folder (refered
to as <code><Project-Folder></code> below), and (2) copy the runtime JARs to
the project's WEB-INF/lib directory.
-It is important to copy the <em>contents</em> of <code>netui-blank</code> into
your project folder, not the <code>netui-blank</code> folder itself. After you
have copied the contents of <code>netui-blank</code> into your project folder,
the following directory structure should exist:</p>
-<source><Project-Folder>
- resources
- WEB-INF
- Controller.jpf
- error.jsp
- index.jsp</source>
- <p>The following Ant command will copy the necessary runtime and tag library
JARs to <code><Project-Folder>/WEB-INF/lib</code>.</p>
-<source> ant
- -f %BEEHIVE_HOME%\ant\buildWebapp.xml
- -Dwebapp.dir=<Project-Folder>
- deploy.beehive.webapp.runtime</source>
- <p>To build and run the template web app, run the following Ant command.
(Before running ensure that Tomcat is turned on:
<code>%CATALINA_HOME%\bin\startup.bat</code>. Or use the Ant command provided
in the distribution: <code>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
start</code>. If you use the provided Ant command, you will have to press
<code>Ctrl+C</code> to continue issuing commands in that command window.)</p>
-<source> ant
- -f ant\buildWebapp.xml
- -Dwebapp.dir=<Project-Folder>
- -Dcontext.path=WebApp-Blank
- build.webapp
- deploy</source>
-<p>If the WebApp-Blank web app is already deployed, use the following
target:</p>
-<source> ant
- -f ant\buildWebapp.xml
- -Dwebapp.dir=<Project-Folder>
- -Dcontext.path=WebApp-Blank
- undeploy
- build.webapp
- deploy</source>
-<p>You can now try out the web app by pointing your browser at the following
links.</p>
- <ul>
- <li>Run the controller file's begin() method: <fork
href="http://localhost:8080/WebApp-Blank/">http://localhost:8080/WebApp-Blank/</fork></li>
-</ul>
- </section>
-
- </body>
- <footer>
- <legal>Java, J2EE, and JCP are trademarks or registered trademarks of
Sun Microsystems, Inc. in the United States and other countries.<br/>
- © 2004, Apache Software Foundation
- </legal>
- </footer>
-</document>
+ <header>
+ <title>Page Flow Project Template</title>
+ </header>
+ <body>
+ <section id="intro">
+ <title>Introduction</title>
+ <p>Use the Page Flow application template (located at
+
<code><BeehiveRoot>/samples/netui-blank</code>) as a
+ starting point for building your own Page Flow
applications.
+ The template contains everything needed in a
basic Page Flow
+ application, except for the runtime and
<netui> tag library
+ JAR files. This topic explains how to add those
JAR files and
+ get the template up and running. </p>
+ </section>
+ <section id="using">
+ <title>Using the Page Flow Web App Template</title>
+ <p>The following instruction assume that you have
completed all of
+ required and optional steps in the Beehive set
up procedure at
+ <a href="site:../setup">Installation and
Setup</a>.</p>
+ <p>To use the template, follow these steps:</p>
+ <section id="copy">
+ <title>Copy and Rename the Template
Folder</title>
+ <p>Copy the folder
+
<code><BeehiveRoot>/samples/netui-blank</code> to your
+ development directory.
(<BeehiveRoot> refers to the path
+ to the top-level directory of your
Beehive distribution. A
+ typical path would be
<code>C:/apache-beehive-1.0</code>.)
+ </p>
+ <p>Rename <code>netui-blank</code> to something
more
+ appropriate to your application. Below
we assume that the path to
+ the renamed <code>netui-blank</code> is
+ <code><Project-Folder></code>. </p>
+ </section>
+ <section id="copy_runtime">
+ <title>Copy the Runtime JARs into the Template
Folder</title>
+ <p>Copy the runtime JARs to the project's
WEB-INF/lib
+ directory.</p>
+ <p>The following Ant command will copy the
necessary runtime
+ and tag library JARs to
+
<code><Project-Folder>/WEB-INF/lib</code>.</p>
+ <source> ant -f
+ <BeehiveRoot>\ant\webappRuntimeCore.xml
+ -Dwebapp.dir=<Project-Folder>
+ deploy.beehive.webapp.runtime</source>
+ </section>
+ <section><title>Build the Template Web App</title>
+ <p>To build the web app, run the following Ant
command.</p>
+<source>ant
+ -f <BeehiveRoot>\ant\buildWebapp.xml
+ -Dwebapp.dir=<Project-Folder>
+ build</source>
+</section>
+ <section>
+ <title>To Deploy and Run the Template Web
App</title>
+ <p>Before deploying the application, ensure
that Tomcat is turned on:
+
<code>%CATALINA_HOME%\bin\startup.bat</code>.</p>
+ <p>To deploy the web application, visit the following URL in a web
browser. (We recommend that you open the
+ link in a new browser window. Each time you want to redeploy
the application,
+ simply refresh the browser.)</p>
+ <p>In the URL below replace <strong><SomeContext></strong> with some
string that is appropriate for your
+ application. This string will appear in the URL when users
visit your application.
+ Replace <strong><Project-Folder></strong> with the path to
your project folder.</p>
+ <p class="quote">
+
http://localhost:8080/manager/deploy?path=/<strong><SomeContext></strong>&war=file:<strong><Project-Folder></strong>&update=true
+ </p>
+ <p>This method of application deployment assumes that you have added
the <code>manager</code>
+ role to your Tomcat installation. For instructions on adding
the <code>manager</code> role,
+ see <a class="fork" href="../setup.html#optional">Beehive
Installation and Setup</a>.</p>
+ <p>If you are prompted for a username/password, enter:
<code>manager/manager</code></p>
+ <p>You can now try out the web app by pointing
your browser at
+ the following link.</p>
+ <ul>
+ <li>Run the controller file's begin()
method:
+
http://localhost:8080/<strong><SomeContext></strong>/</li>
+ </ul>
+ </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/> © 2004, Apache Software Foundation
</legal>
+ </footer>
+</document>
\ No newline at end of file
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml?view=diff&r1=153844&r2=153845
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
Mon Feb 14 13:09:56 2005
@@ -37,47 +37,6 @@
<li><code>ANT_HOME/bin</code></li>
<li><code>JAVA_HOME/bin</code></li>
</ul>
- <!--
- <p>The following
<code>.bat|.sh</code> files are provided as a
- convenience for setting the
necessary
- environmental variables.</p>
-
<p><strong><code>tutorialSetup.bat</code></strong></p>
- <source>@echo off
-REM
-REM Customize this file based on where you install various 3rd party components
-REM such as the JDK, Ant and Tomcat.
-REM
-
-REM location of a JDK
-set JAVA_HOME=C:\jdk1.5.0
-
-REM location of Ant
-set ANT_HOME=C:\apache-ant-1.6.2
-
-REM location of Tomcat
-set CATALINA_HOME=C:\jakarta-tomcat-5.0.25
-
-set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin</source>
-
<p><strong><code>tutorialSetup.sh</code></strong></p>
- <source>#!/bin/sh
-
-#
-# Customize this file based on where you install various 3rd party components
-# such as the JDK, Ant and Tomcat.
-#
-
-# location of a JDK
-export [EMAIL PROTECTED]@
-
-# location of Ant
-export [EMAIL PROTECTED]@
-
-# location of Tomcat
-export [EMAIL PROTECTED]@
-
-export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
-</source>
--->
</section>
<section>
<title>To Start the Tomcat Server</title>
@@ -90,13 +49,29 @@
<section>
<title>Introduction</title>
<p>
- In this step you will create a Controller file and a
JSP page. These are the basic files in a Beehive 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.jpf file is the Controller
(naturally), and the JSP pages are the View. This web application's Model is
very simple: it consists of two fields that represent the user's age and name.
<!--[tbd: more, explain]-->)
+ In this step you will create a Controller file and a
JSP page. These are the basic files in
+ a Beehive 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.jpf
+ file is the Controller (naturally), and the JSP pages
are the View. This web application's
+ Model is very simple: it consists of two fields that
represent the user's age and name.
+ <!--[tbd: more, explain]-->)
</p>
<p>
- 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 a complex set of tasks, 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.]-->
+ 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 a complex set of tasks, 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.
+ 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>
</section>
<section>
@@ -120,7 +95,10 @@
</section>
<section>
<title>To Copy Runtime JARs to the Project Folder</title>
- <p>In this step you will assemble the runtime resources for
your Page Flow application. The runtime JARs include the Page Flow runtime,
the <netui> tag library, etc. These resources are loaded into your project's
<code>WEB-INF/lib</code> folder using the Ant command below.</p>
+ <p>In this step you will assemble the runtime resources for
your Page Flow application.
+ The runtime JARs include the Page Flow
runtime, the <netui> tag library, etc.
+ These resources are loaded into your
project's <code>WEB-INF/lib</code> folder
+ using the Ant command below.</p>
<p>At the command prompt, enter the following Ant command:</p>
<source>ant
-f <BeehiveRoot>\ant\webappRuntimeCore.xml
@@ -206,7 +184,7 @@
link in a new browser window. Each time you want to redeploy
the application,
simply refresh the browser.</p>
<p class="quote">
- <a class="fork"
href="http://localhost:8080/manager/deploy?path=/pageflow_tutorial&war=file:C:/beehive_projects/pageflow_tutorial&update=true">http://localhost:8080/manager/deploy?path=/pageflow_tutorial&war=file:C:/pageflow_projects/control_tutorial&update=true</a>
+ <a class="fork"
href="http://localhost:8080/manager/deploy?path=/pageflow_tutorial&war=file:C:/beehive_projects/pageflow_tutorial&update=true">http://localhost:8080/manager/deploy?path=/pageflow_tutorial&war=file:C:/pageflow_projects/pageflow_tutorial&update=true</a>
</p>
<p>If you are prompted for a username/password, enter:
<code>manager/manager</code></p>
<p>(For an explanation of this method of deploying an application to
Tomcat,
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_AddressBook.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_AddressBook.xml?view=diff&r1=153844&r2=153845
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_AddressBook.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_AddressBook.xml
Mon Feb 14 13:09:56 2005
@@ -1,107 +1,231 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"http://forrest.apache.org/dtd/document-v13.dtd">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+ "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
- <header>
- <title>Beehive AddressBookWS and EmployeeWS Samples</title>
- </header>
- <body>
- <section>
- <title>The AddressBookWS and EmployeeWS Samples</title>
- <p>The <strong>AddressBookWS</strong> sample is an
annotation-aware web service based on the Apache Axis sample of the same name.
AddressBookWS is organized as an application with POJO (Plain Old Java Objects)
models, service interface, service implementation, and unit tests for the
service. Apache Axis provides automatic client-generation and junit test cases
for the sample. The directory structure and ant build file can be used as a
template for building new standalone web services.</p>
- <p><strong>EmployeeWS</strong> provides a web service interface
for an Employee database. Using SOAP messages, the web service queries the
backend database: selecting, updating and inserting employee data. A Beehive
database control connects the web service and the database. The web service
class is located at <code>EmployeeWS/WEB-INF/src/web/Service.jws</code>. The
database control is located at
<code>EmployeeWS/WEB-INF/src/org/apache/beehive/sample/EmployeeDBControl.jcx</code>.
Note that EmployeeDBControl is a subclass of DatabaseControl, another Beehive
sample. For more information see <link
href="../controls/sample_controls-db.html">Database Control</link>. </p>
-<p>Apache Derby supplies the database implementation. (Installing Derby
requires a simple JAR file download, described below.) Apache Axis provides
the automatic client-generation for the web service. Custom unit tests are
provided to exercise the webservice methods. The unit tests creates the
database table, inserts a new record, queries the database, and finally drops
the table. Use the junit tests as a template for building automatic tests for
your own controls.</p>
- </section>
- <section>
- <title>Running the Samples</title>
- <section>
- <title>Requirements for Running the Sample</title>
- <p>To run the Samples, you need:</p>
- <ul>
- <li>Beehive</li>
- <li>Tomcat 5</li>
- <li>J2SE 5</li>
- <li>Ant 1.6.2</li>
- <li>junit.jar (v3.8.1 or later)</li>
- <li>derby_46005.jar (for EmployeeWS only)</li>
- </ul>
- </section>
- <section>
- <title>Setting up the Environment</title>
- <p>Download a Beehive distribution archive (<fork
href="http://cvs.apache.org/dist/incubator/beehive/v1.0-alpha/bin/">http://cvs.apache.org/dist/incubator/beehive/v1.0-alpha/bin/</fork>),
and explode it on your local machine. In the instructions below, the top
level directory of the exploded Beehive archive is called
'<code><dist-dir></code>'. For example if you explode the archive into </p>
- <source>C:/beehive</source>
- <p>then</p>
- <source><dist-dir> =
C:/apache-beehive-incubating-1.0-alpha-snapshot</source>
- <p>Edit <code><dist-dir>/beehiveUser.cmd|sh</code> to match
your local environment. The following four paths must resolve to paths on your
machine.</p>
- <source>
- BEEHIVE_HOME
- JAVA_HOME
- CATALINA_HOME
- ANT_HOME
-</source>
- <p>
- <code>BEEHIVE_HOME</code> should refer to
<dist-dir>:</p>
- <source>
-REM the root of Beehive distribution
-set BEEHIVE_HOME=C:\beehive\apache-beehive-incubating-alpha-xxx
-</source>
- <p>After editing the file, open a command shell and run
<code>beehiveUser.cmd|sh</code>.</p>
- </section>
- <p>Download junit.jar from <link
href="http://prdownloads.sourceforge.net/junit/junit3.8.1.zip?download">http://prdownloads.sourceforge.net/junit/junit3.8.1.zip?download</link>
</p>
- <p> Copy <code>junit.jar</code> to <code>ANT_HOME/lib</code>.</p>
- <p> Download derby_46005.jar from <link
href="http://incubator.apache.org/derby/binaries/derby_snapshot_svnversion_46005.ZIP">http://incubator.apache.org/derby/binaries/derby_snapshot_svnversion_46005.ZIP</link>.</p>
- <p> Copy <code>derby_46005.jar</code> to
<code>BEEHIVE_HOME/samples/EmployeeWS/WEB-INF/lib</code>.</p>
- <section>
- <title>Setting up the Server</title>
- <p>
- <code>cd</code> to <dist-dir>. </p>
- <p>Run the following Ant command:</p>
- <source> ant -f ant\buildWebapp.xml start</source>
- <p>This will start the Tomcat server located at
<code>CATALINA_HOME</code>.</p>
- <p>To build and deploy the web services, run the following Ant
commands:</p>
- <source> ant
- -Dwebapp.dir=%BEEHIVE_HOME%\samples\AddressBookWS
- -Dcontext.path=AddressBookWS
- -f ant\buildWebapp.xml
- deploy.wsm.webapp.runtime
- build.webapp
- deploy</source>
- <source> ant
- -Dwebapp.dir=%BEEHIVE_HOME%\samples\EmployeeWS
- -Dcontext.path=EmployeeWS
- -f ant\buildWebapp.xml
- deploy.wsm.webapp.runtime
- build.webapp
- deploy</source>
- <p>Verify that the web services are running by pointing your
browser to:</p>
- <p>
- <fork
href="http://localhost:8080/AddressBookWS/">http://localhost:8080/AddressBookWS/</fork>
- </p>
- <p>and</p>
- <p>
- <fork
href="http://localhost:8080/EmployeeWS/">http://localhost:8080/EmployeeWS/</fork>
- </p>
- <p>Follow the validation links (<fork
href="http://localhost:8080/AddressBookWS/happyaxis.jsp">http://localhost:8080/AddressBookWS/happyaxis.jsp</fork>
and <fork
href="http://localhost:8080/EmployeeWS/happyaxis.jsp">http://localhost:8080/EmployeeWS/happyaxis.jsp</fork>)
to see the verification pages.</p>
- <p>For the WSDLs visit</p>
- <p><link
href="http://localhost:8080/AddressBookWS/web/Service.jws?wsdl">
http://localhost:8080/AddressBookWS/web/Service.jws?wsdl</link></p>
- <p><link
href="http://localhost:8080/EmployeeWS/web/Service.jws?wsdl">
http://localhost:8080/EmployeeWS/web/Service.jws?wsdl</link></p>
- </section>
- <section>
- <title>Setting up the Clients</title>
- <p>To generate the clients run the following build files.</p>
- <source> ant -f
%BEEHIVE_HOME%/samples/AddressBookWS/WEB-INF/client-build.xml</source>
- <p>and</p>
- <source> ant -f
%BEEHIVE_HOME%/samples/EmployeeWS/WEB-INF/client-build.xml</source>
- <p>Note that you do not need to run a particular target within
<code>client-build.xml</code>. Simply run the ant commands shown above and the
client will be generated in <code>WEB-INF/build/generated</code>.</p>
- <p>The clients consist of JUnit test cases that exercise the
contract published in the WSDL. The final result shows the number of
successfully passed JUnit tests.</p>
- <p>The code generated in
<code>/WEB-INF/build/generated/</code> can be used as a template to write your
own client side applications.</p>
- <p>Note that the client-build.xml scripts make certain
assumptions about the context.path provided when the WS server is deployed. If
the context.path differs from the name of the directory for a sample, the URLs
in client-build.xml have to be adjusted accordingly.
-</p>
- </section>
- </section>
- </body>
- <footer>
- <legal>Java, J2EE, and JCP are trademarks or registered trademarks of
Sun Microsystems, Inc. in the United States and other countries.<br/>
- © 2004, Apache Software Foundation
- </legal>
- </footer>
-</document>
+ <header>
+ <title>Beehive AddressBookWS and EmployeeWS Samples</title>
+ </header>
+ <body>
+ <section id="intro">
+ <title>The AddressBookWS and EmployeeWS Samples</title>
+ <p>The <strong>AddressBookWS</strong> sample is an
annotation-aware
+ web service based on the Apache Axis sample of
the same name.
+ AddressBookWS is organized as an application
with POJO (Plain
+ Old Java Objects) models, service interface,
service
+ implementation, and unit tests for the service.
Apache Axis
+ provides automatic client-generation and junit
test cases for
+ the sample. The directory structure and ant
build file can be
+ used as a template for building new standalone
web services.</p>
+ <p><strong>EmployeeWS</strong> provides a web service
interface for
+ an Employee database. Using SOAP messages, the
web service
+ queries the backend database: selecting,
updating and inserting
+ employee data. A Beehive database control
connects the web
+ service and the database. The web service class
is located at
+ <code>EmployeeWS/WEB-INF/src/web/Service.
jws</code>. The
+ database control is located at
+
<code>EmployeeWS/WEB-INF/src/org/apache/beehive/sample/EmployeeDBControl.jcx</code>.
+ Note that EmployeeDBControl is a subclass of
DatabaseControl,
+ another Beehive sample. For more information
see <a
+
href="../controls/sample_controls-db.html">Database
+ Control</a>. </p>
+ <p>Apache Derby supplies the database implementation.
(Installing
+ Derby requires a simple JAR file download,
described below.)
+ Apache Axis provides the automatic
client-generation for the
+ web service. Custom unit tests are provided to
exercise the
+ webservice methods. The unit tests creates the
database table,
+ inserts a new record, queries the database, and
finally drops
+ the table. Use the junit tests as a template
for building
+ automatic tests for your own controls.</p>
+ </section>
+ <section id="running">
+ <title>Running the Samples</title>
+ <section id="reqs">
+ <title>Requirements for Running the
Sample</title>
+ <p>To run the Samples, you need:</p>
+ <ul>
+ <li>Beehive</li>
+ <li>Tomcat 5</li>
+ <li>J2SE 5</li>
+ <li>Ant 1.6.2</li>
+ <li>junit.jar (v3.8.1 or later, details
below)</li>
+ <li>derby.jar (for EmployeeWS only,
details below)</li>
+ </ul>
+ </section>
+ <section id="enviro">
+ <title>To Set up the Environment</title>
+ <p>Before proceeding, complete all of the
necessary and
+ optional steps in the following topic:
<a class="fork"
+ href="../setup.html">Beehive
Installation and Setup</a></p>
+ <p>Open a command shell and confirm that you
have the following
+ variables have been set:</p>
+ <ul>
+ <li>
+ <code>ANT_HOME</code>
+ </li>
+ <li>
+ <code>JAVA_HOME</code>
+ </li>
+ <li>
+ <code>CATALINA_HOME</code>
+ </li>
+ </ul>
+ <p>Also ensure that the following elements are
on your
+ <code>PATH</code>:</p>
+ <ul>
+ <li>
+ <code>ANT_HOME/bin</code>
+ </li>
+ <li>
+ <code>JAVA_HOME/bin</code>
+ </li>
+ </ul>
+ </section>
+ <section id="setup_server">
+ <title>To Set up the Server</title>
+ <section id="copy_app">
+ <title>To Copy the Petstore Application
to a Project
+ Folder</title>
+ <p>To keep your Beehive distribution
directory pristine,
+ you should copy the
<code>AddressBookWS</code> and <code>EmployeeWS</code>
+ folders to
+ another location before
proceeding. The following
+ instructions assume that you
have copied these folders
+ into the directory
+
<code>C:/beehive_projects</code>, resulting in the
+ following directory
structure.</p>
+<source>C:
+ beehive_projects
+ AddressBookWS
+ EmployeeWS</source>
+ </section>
+ <section id="copy_runtime">
+ <title>To Copy the Runtime Resources</title>
+ <p>The AddressBookWS and EmployeeWS
applications are distributed without the Beehive
+ runtime JAR files they need to run.
+ To copy the runtime JARs into the apps,
+ run the following Ant commands. </p>
+ <p><strong>Note:</strong> replace
<code><BeehiveRoot></code> with the path to the
+ top level folder of your Beehive
installation, for example,
+
<code>C:\apache\apache-beehive-1.0</code>. </p>
+<source>ant
+ -f <strong><BeehiveRoot></strong>\ant\webappRuntimeCore.xml
+ -Dwebapp.dir=C:\beehive_projects\AddressBookWS
+ deploy.beehive.webapp.runtime</source>
+<source>ant
+ -f <strong><BeehiveRoot></strong>\ant\webappRuntimeCore.xml
+ -Dwebapp.dir=C:\beehive_projects\EmployeeWS
+ deploy.beehive.webapp.runtime</source>
+ </section>
+ <section id="external_jars">
+ <title>To Download Junit and Derby JAR
Files</title>
+ <p>Download the junit ZIP archive from <a
+
href="http://prdownloads.sourceforge.net/junit/junit3.8.1.zip?download">http://prdownloads.sourceforge.net/junit/junit3.8.1.zip?download</a>
+ </p>
+ <p>Unzip the archive and copy
<code>junit.jar</code> to
+ <code>ANT_HOME/lib</code>.</p>
+ <p> Download the derby ZIP archive from <a
+
href="http://incubator.apache.org/derby/binaries/derby_snapshot_svnversion_46005.ZIP">http://incubator.apache.org/derby/binaries/derby_snapshot_svnversion_46005.ZIP</a>.</p>
+ <p>Unzip the archive and copy
<code>derby.jar</code> to
+
<code>C:/beehive_projects/EmployeeWS/WEB-INF/lib</code>.</p>
+ </section>
+ <section id="compile">
+ <title>To Compile the Apps</title>
+ <p>To compile the AddressBookWS app, enter the following Ant
command.</p>
+<source>ant
+ -f <strong><BeehiveRoot></strong>\ant\buildWebapp.xml
+ -Dwebapp.dir=C:\beehive_projects\AddressBookWS
+ build</source>
+ <p>To compile the EmployeeWS app, enter the following Ant
command:</p>
+<source>ant
+ -f <strong><BeehiveRoot></strong>\ant\buildWebapp.xml
+ -Dwebapp.dir=C:\beehive_projects\EmployeeWS
+ build</source>
+ </section>
+ <section id="start_tomcat">
+ <title>To Start Tomcat</title>
+ <p>To start Tomcat, run the following
command:</p>
+ <source>%CATALINA_HOME%\bin\startup.bat</source>
+ </section>
+ <section id="deploy">
+ <title>To Deploy to Tomcat</title>
+ <p>To deploy the applications, click the following links. We recommend
that you open the
+ links in new browser windows. Each time you want to redeploy
an application,
+ simply refresh the appropriate browser.</p>
+ <p>This method of application deployment assumes that you have added
the <code>manager</code>
+ role to your Tomcat installation. For instructions on adding
the <code>manager</code> role,
+ see <a class="fork" href="../setup.html#optional">Beehive
Installation and Setup</a>.</p>
+ <p class="quote">
+ <a class="fork"
href="http://localhost:8080/manager/deploy?path=/AddressBookWS&war=file:C:/beehive_projects/AddressBookWS&update=true">http://localhost:8080/manager/deploy?path=/AddressBookWS&war=file:C:/pageflow_projects/AddressBookWS&update=true</a>
+ </p>
+ <p class="quote">
+ <a class="fork"
href="http://localhost:8080/manager/deploy?path=/EmployeeWS&war=file:C:/beehive_projects/EmployeeWS&update=true">http://localhost:8080/manager/deploy?path=/EmployeeWS&war=file:C:/pageflow_projects/EmployeeWS&update=true</a>
+ </p>
+ <p>If you are prompted for a username/password, enter:
<code>manager/manager</code></p>
+ <p>(For an explanation of this method of deploying an application to
Tomcat,
+ see the Tomcat 5 documentation:
+ <a class="fork"
href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Deploy%20A%20New%20Application%20from%20a%20Local%20Path">Deploy
A New Application from a Local Path</a>)</p>
+ </section>
+ <section><title>To Verify the Deployments</title>
+ <p>Verify that the web services are running by
pointing your
+ browser to:</p>
+ <p>
+ <a class="fork"
href="http://localhost:8080/AddressBookWS/">
+
http://localhost:8080/AddressBookWS/</a>
+ </p>
+ <p>and</p>
+ <p>
+ <a class="fork"
href="http://localhost:8080/EmployeeWS/">
+
http://localhost:8080/EmployeeWS/</a>
+ </p>
+ <p>Follow the validation links (<a class="fork"
+
href="http://localhost:8080/AddressBookWS/happyaxis.jsp">http://localhost:8080/AddressBookWS/happyaxis.jsp</a>
+ and <a class="fork"
+
href="http://localhost:8080/EmployeeWS/happyaxis.jsp">http://localhost:8080/EmployeeWS/happyaxis.jsp</a>)
+ to see the verification pages.</p>
+ <p>For the WSDLs visit</p>
+ <p>
+ <a
+
href="http://localhost:8080/AddressBookWS/web/Service.jws?wsdl">
+
+
http://localhost:8080/AddressBookWS/web/Service.jws?wsdl</a>
+ </p>
+ <p>
+ <a
+
href="http://localhost:8080/EmployeeWS/web/Service.jws?wsdl">
+
+
http://localhost:8080/EmployeeWS/web/Service.jws?wsdl</a>
+ </p>
+ </section>
+
+ </section>
+ <section id="setup_clients">
+ <title>To Set up the Clients</title>
+ <p>To generate the clients run the following
build files.</p>
+<source>ant -f
C:/beehive_projects/AddressBookWS/WEB-INF/build-client.xml</source>
+ <p>and</p>
+<source>ant -f C:/beehive_projects/EmployeeWS/WEB-INF/build-client.xml</source>
+ <p>Note that you do not need to run a
particular target within
+ <code>client-build.xml</code>. Simply
run the ant commands
+ shown above and the client will be
generated in
+
<code>WEB-INF/build/generated</code>.</p>
+ <p>The clients consist of JUnit test cases that
exercise the
+ contract published in the WSDL. The
final result shows the
+ number of successfully passed JUnit
tests.</p>
+ <p>The code generated in
<code>/WEB-INF/build/generated/</code>
+ can be used as a template to write your
own client side
+ applications.</p>
+ <p>Note that the client-build.xml scripts make
certain
+ assumptions about the Tomcat deployment
context path, namely, that the apps are
+ deployed
+ on the context paths
<code>AddressBookWS</code> and <code>EmployeeWS</code>.
+ If the context paths differ from these
values, the URLs in
+ the build-client.xml files must be
adjusted accordingly. </p>
+ </section>
+ </section>
+ </body>
+ <footer>
+ <legal>Java, J2EE, and JCP are trademarks or registered
trademarks of
+ Sun Microsystems, Inc. in the United States and other
+ countries.<br/> © 2004, Apache Software Foundation
</legal>
+ </footer>
+</document>
\ No newline at end of file
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_Dashboard.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_Dashboard.xml?view=diff&r1=153844&r2=153845
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_Dashboard.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_Dashboard.xml
Mon Feb 14 13:09:56 2005
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN"
"http://forrest.apache.org/dtd/document-v13.dtd">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Beehive Web Service Sample: Petstore Dashboard</title>
</header>
<body>
- <section>
+ <section id="dir_struct">
<title>The Petstore Dashboard Sample</title>
<p>Petstore has both a web site and a web service interface. The web
site is designed for customer access; the web service is for employee access.
Through the web service, employees update the prices and inventory seen on the
customer web site. The Petstore Dashboard is a Swing client application for
this web service. Updates made on the Dashboard are passed to the web service
and ultimately the updates appear on the Petstore web site.
</p>
@@ -19,9 +19,9 @@
-->
</section>
-<section>
+<section id="running">
<title>Running the Dashboard Sample</title>
- <section>
+ <section id="requirements">
<title>Requirements for Running the Sample</title>
<p>To run the Sample, you need:</p>
<ul>
@@ -33,82 +33,101 @@
<li>mailapi.jar (details below)</li>
</ul>
</section>
- <section>
- <title>Setting up the Environment</title>
- <p>Download a Beehive distribution archive (<fork
href="http://cvs.apache.org/dist/incubator/beehive/v1.0-alpha/bin/">http://cvs.apache.org/dist/incubator/beehive/v1.0-alpha/bin/</fork>),
and explode it on your local machine. In the instructions below, the top
level directory of the exploded Beehive archive is called
'<code><dist-dir></code>'. For example if you explode the archive into </p>
- <source>C:/beehive</source>
- <p>then</p>
- <source><dist-dir> =
C:/apache-beehive-incubating-1.0-alpha-snapshot</source>
- <p>Edit <code><dist-dir>/beehiveUser.cmd|sh</code> to match
your local environment. The following four paths must resolve to paths on your
machine.</p>
- <source>
- BEEHIVE_HOME
- JAVA_HOME
- CATALINA_HOME
- ANT_HOME
-</source>
- <p>
- <code>BEEHIVE_HOME</code> should refer to
<dist-dir>:</p>
- <source>
-REM the root of Beehive distribution
-set BEEHIVE_HOME=C:\beehive\apache-beehive-incubating-alpha-xxx
-</source>
- <p>After editing the file, open a command shell and run
<code>beehiveUser.cmd|sh</code>.</p>
- </section>
- <section>
- <title>Start Tomcat</title>
- <p>To start Tomcat, run the following command:</p>
- <source>%CATALINA_HOME%\bin\startup.bat</source>
- <p>You can also start Tomcat by running the following Ant
command, provided in the buildWebapp.xml file:</p>
- <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
start</source>
- <p><strong>Note:</strong> if you use the second of these
methods for starting Tomcat, you will have to enter Ctrl+C into the command
shell to enter any further commands.</p>
- </section>
- <section>
+ <section id="set_up">
+ <title>To Deploy Petstore</title>
+ <p>The Petstore Dashboard is a view on the Petstore web
application. So the Petstore
+ Dashboard assumes that the Petstore web
application is live and running.</p>
+ <p>To ensure that the Petstore web app is live
and running complete the instructions
+ in the following topic: <a
href="site:jpetstore">Beehive Sample: Petstore</a></p>
+ <p>When you have completed the instructions,
leave the instance of Tomcat server (with
+ Petstore deployed) running.</p>
+ </section>
+ <section id="copy_app">
+ <title>To Copy the Petstore Dashboard
Application to a Project
+ Folder</title>
+ <p>To keep your Beehive distribution directory
+ pristine, you should copy the
+ <code>PetStoreDashboard</code> folder
to another location before
+ proceeding. The following instructions
assume that you have
+ copied the folder
<code>PetStoreDashboard</code> into the
+ directory
<code>C:/beehive_projects</code>,
+ resulting in the following directory
structure.</p>
+ <source>C:
+ beehive_projects
+ PetStoreDashboard</source>
+ </section>
+<!-- <section id="start_tomcat">
+ <title>To Start Tomcat</title>
+ <p>To start Tomcat, run the following
command:</p>
+ <source>%CATALINA_HOME%\bin\startup.bat</source>
+ </section>
+ <section id="undeploy_petstore">
<title>Undeploy Petstore</title>
<p>If you have previously deployed Petstore, you must undeploy
it now. (This allows you to recompile the Petstore source, which occurs in the
next step.)</p>
- <source> ant -Dwebapp.dir=BEEHIVE_HOME/samples/petstoreWeb
-Dcontext.path=petstoreWeb -f ant/buildWebapp.xml undeploy</source>
+ <p class="quote">
+ <a class="fork"
href="http://localhost:8080/manager/undeploy?path=/petstoreWeb&war=file:C:/beehive_projects/petstoreWeb&update=true">http://localhost:8080/manager/undeploy?path=/petstoreWeb&war=file:C:/pageflow_projects/petstoreWeb&update=true</a>
+ </p>
</section>
- <section>
- <title>Download Required JAR Files</title>
-<p> Before you can build Petstore Dashboard you must download 1)
activation.jar and 2) mailapi.jar.</p>
+-->
+ <section id="download_req_JAR_files">
+ <title>To Download Required JAR Files</title>
+<p> Before you can build Petstore Dashboard you must download 1)
<code>activation.jar</code> and 2) <code>mailapi.jar</code>.</p>
-<p> 1) download activation.jar (<link
href="http://java.sun.com/products/javabeans/glasgow/jaf.html">http://java.sun.com/products/javabeans/glasgow/jaf.html</link>)
</p>
+<p> 1) download <code>activation.jar</code> (<a
href="http://java.sun.com/products/javabeans/glasgow/jaf.html">http://java.sun.com/products/javabeans/glasgow/jaf.html</a>)
</p>
- <p>Note that activation.jar is archived in the JAF 1.0.2 distribution ZIP
file. Download the JAF 1.0.2 ZIP, extract activation.jar, and copy
activation.jar into both </p>
+ <p>Note that <code>activation.jar</code> is archived in the JAF 1.0.2
distribution ZIP file. Download the JAF 1.0.2 ZIP, extract
<code>activation.jar</code>, and copy <code>activation.jar</code> into both </p>
-<source> BEEHIVE_HOME/samples/PetstoreDashboard/lib/ </source>
+<source> C:/beehive_projects/PetstoreDashboard/lib/ </source>
<p>and</p>
-<source> BEEHIVE_HOME/samples/petstoreWeb/WEB-INF/lib</source>
+<source> C:/beehive_projects/petstoreWeb/WEB-INF/lib</source>
-<p>2) mailapi.jar (<link
href="http://java.sun.com/products/javamail/downloads/index.html">http://java.sun.com/products/javamail/downloads/index.html</link>)</p>
+<p>2) <code>mailapi.jar</code> (<a
href="http://java.sun.com/products/javamail/downloads/index.html">http://java.sun.com/products/javamail/downloads/index.html</a>)</p>
-<p> mailapi.jar is archived in the JavaMail 1.3.2 distribution ZIP file.
Download the JavaMail 1.3.2 ZIP, extract mailapi.jar, and copy mailapi.jar into
both </p>
+<p> <code>mailapi.jar</code> is archived in the JavaMail 1.3.2 distribution
ZIP file. Download the JavaMail 1.3.2 ZIP, extract <code>mailapi.jar</code>,
and copy <code>mailapi.jar</code> into both </p>
-<source> BEEHIVE_HOME/samples/PetstoreDashboard/lib/ </source>
+<source> C:/beehive_projects/PetstoreDashboard/lib/ </source>
<p>and</p>
-<source> BEEHIVE_HOME/samples/petstoreWeb/WEB-INF/lib</source>
+<source> C:/beehive_projects/petstoreWeb/WEB-INF/lib</source>
</section>
-<section>
- <title>Initialize, Build and Deploy Petstore</title>
-<p>To build and deploy Petstore, enter the following Ant command:</p>
+<section id="build_petstore">
+ <title>To Recompile and Redeploy Petstore</title>
+<p>In this step you will recompile and redeploy Petstore. The following
instruction assume that you have Petstore
+ up and running on an instance of Tomcat server. If Petstore is not up
and running, complete the following
+ instructions before proceeding: <a href="site:jpetstore">Beehive
Sample: Petstore</a>.</p>
+ <p>To recompile the Petstore web app, run the following Ant command.</p>
+ <p><strong>Note:</strong> replace
<code><BeehiveRoot></code> with the path to the
+ top level folder of your Beehive
installation, for example,
+
<code>C:\apache\apache-beehive-1.0</code>. </p>
<source>ant
- -Dwebapp.dir=%BEEHIVE_HOME%/samples/petstoreWeb
- -Dcontext.path=petstoreWeb
- -f ant/buildWebapp.xml
- deploy.beehive.webapp.runtime build.webapp deploy
- </source>
- <p>To launch the Dashboard:</p>
- <p>cd to: <code>BEEHIVE_HOME/samples/PetstoreDashboard</code></p>
- <p>At the command line, enter <code>ant</code></p>
- <p></p>
+ -f <strong><BeehiveRoot></strong>\ant\buildWebapp.xml
+ -Dwebapp.dir=C:\beehive_projects\petstoreWeb
+ build</source>
+ <p>To redeploy the Petstore web app, click the following link. (We
recommend opening the link in a new window.
+ after deployment has completed, the browser window will display
a status message. After the
+ status message has been displayed, you may close the browser
window.)</p>
+ <p class="quote">
+ <a class="fork"
href="http://localhost:8080/manager/deploy?path=/petstoreWeb&war=file:C:/beehive_projects/petstoreWeb&update=true">http://localhost:8080/manager/deploy?path=/petstoreWeb&war=file:C:/pageflow_projects/petstoreWeb&update=true</a>
+ </p>
+
+</section>
+<section id="launch_dash">
+ <title>To Launch Dashboard</title>
+ <p>To launch the Dashboard, run the following Ant command.</p>
+ <p><strong>Note:</strong> you do not need to run any particular Ant target
in the build.xml file.
+ The appropriate default target will run when you call the build.xml
file shown below.</p>
+ <source>ant -f
<code>C:\beehive_projects\PetstoreDashboard\build.xml</code></source>
<p>The Swing application comes up in its own window. Click on the different
categories and modify price and quantity. The changes show up on the Petstore
site (when the browser is refreshed).
</p>
-<p> Note: If the petstoreWeb sample is deployed to Tomcat with a context.path
different from "petstoreWeb", or if it is deployed to a different server than
localhost:8080, then BEEHIVE_HOME/samples/PetstoreDashboard/build.xml needs to
be modified accordingly. The client generator relies on these default
values.</p>
-
+<p> Note: If the petstoreWeb sample is deployed to Tomcat with a context.path
different from
+ "petstoreWeb", or if it is deployed to a different server than
localhost:8080,
+ then the file
<code>C:/beehive_projects/PetstoreDashboard/build.xml</code> needs to be
modified accordingly.
+ The Dashboard client generator relies on these default values.</p>
+
</section>
</section>