Author: steveh
Date: Tue Nov 9 15:36:01 2004
New Revision: 57112
Modified:
incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html
incubator/beehive/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
Log:
Fixes for
JIRA 67: More details needed on copy netui-blank into pageflow_tutorial
JIRA 68: Pageflow Tutorial WEB-INF workaround no longer needed
JIRA 69: File Name not Match in PageFlow Tutorial
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 Tue Nov
9 15:36:01 2004
@@ -314,7 +314,10 @@
<a href="#Make+a+Project+Folder">Make a Project Folder</a>
</li>
<li>
-<a href="#To+Copy+the+Page+Flow+Application+Template">To Copy the Page Flow
Application Template</a>
+<a href="#To+Copy+Page+Flow+Resources+into+the+Project+Folder">To Copy Page
Flow Resources into the Project Folder</a>
+</li>
+<li>
+<a href="#To+Copy+Runtime+JARs+to+the+Project+Folder">To Copy Runtime JARs to
the Project Folder</a>
</li>
<li>
<a href="#To+Create+a+Controller+File">To Create a Controller File</a>
@@ -346,7 +349,7 @@
<a href="#To+Compile+and+Redeploy+the+Page+Flow">To Compile and Redeploy the
Page Flow</a>
</li>
<li>
-<a href="#To+Test+the+Page+Flow+Web+Application-N10203">To Test the Page Flow
Web Application</a>
+<a href="#To+Test+the+Page+Flow+Web+Application-N1024D">To Test the Page Flow
Web Application</a>
</li>
</ul>
</li>
@@ -360,10 +363,10 @@
<a href="#To+Edit+the+Controller+File+to+Handle+the+Submitted+Data">To Edit
the Controller File to Handle the Submitted Data</a>
</li>
<li>
-<a href="#To+Compile+and+Redeploy+the+Page+Flow-N10256">To Compile and
Redeploy the Page Flow</a>
+<a href="#To+Compile+and+Redeploy+the+Page+Flow-N102A2">To Compile and
Redeploy the Page Flow</a>
</li>
<li>
-<a href="#To+Test+the+Page+Flow+Web+Application-N10264">To Test the Page Flow
Web Application</a>
+<a href="#To+Test+the+Page+Flow+Web+Application-N102B0">To Test the Page Flow
Web Application</a>
</li>
</ul>
</li>
@@ -377,10 +380,10 @@
<a href="#To+Create+a+JSP+Page+to+Display+Submitted+Data">To Create a JSP Page
to Display Submitted Data</a>
</li>
<li>
-<a href="#To+Compile+and+Redeploy+the+Page+Flow-N102AB">To Compile and
Redeploy the Page Flow</a>
+<a href="#To+Compile+and+Redeploy+the+Page+Flow-N102F7">To Compile and
Redeploy the Page Flow</a>
</li>
<li>
-<a href="#To+Test+the+Page+Flow+Web+Application-N102B9">To Test the Page Flow
Web Application</a>
+<a href="#To+Test+the+Page+Flow+Web+Application-N10305">To Test the Page Flow
Web Application</a>
</li>
</ul>
</li>
@@ -521,10 +524,40 @@
beehive_projects
pageflow_tutorial</pre>
</div>
-<a name="N10119"></a><a name="To+Copy+the+Page+Flow+Application+Template"></a>
-<h4>To Copy the Page Flow Application Template</h4>
+<a name="N10119"></a><a
name="To+Copy+Page+Flow+Resources+into+the+Project+Folder"></a>
+<h4>To Copy Page Flow Resources into the Project Folder</h4>
+<div style="margin-left: 0 ; border: 2px">
+<p>In this step you will copy (most of) the Page Flow application template
into your project folder. The application template gives the basic directory
structure for a Page Flow web app, and it includes some common resources, for
example: image files, supporting JavaScript files, and web app configuration
files.</p>
+<p>Copy the folder <span
class="codefrag">BEEHIVE_HOME/samples/netui-blank/resources</span> into your
project folder <span
class="codefrag">C:\beehive_projects\pageflow_tutorial</span>.</p>
+<p>Copy the folder <span
class="codefrag">BEEHIVE_HOME/samples/netui-blank/WEB-INF</span> into your
project folder <span
class="codefrag">C:\beehive_projects\pageflow_tutorial</span>.</p>
+<p>Before proceeding, confirm that the following directory structure
exists:</p>
+<pre class="code">C:
+ beehive_projects
+ pageflow_tutorial
+ resources
+ WEB-INF</pre>
+<p>Note: do <em>not</em> copy the files <span
class="codefrag">Controller.jpf</span>, <span
class="codefrag">index.jsp</span>, or <span class="codefrag">error.jsp</span>.
For the sake of instruction, you will create these files from scratch in the
steps below. </p>
+<p>If you see the following directory structure you have made a mistake.</p>
+<pre class="code">C:
+ beehive_projects
+ pageflow_tutorial
+ resource
+ WEB-INF
+ Controller.jpf - WRONG!
+ error.jsp - WRONG!
+ index.jsp - WRONG!</pre>
+<p>Note: do <em>not</em> copy the folder <span
class="codefrag">netui-blank</span> into your project folder.</p>
+<p>If you see the following directory structure you have made a mistake.</p>
+<pre class="code">C:
+ beehive_projects
+ pageflow_tutorial
+ netui-blank - WRONG!</pre>
+<p></p>
+</div>
+<a name="N10167"></a><a name="To+Copy+Runtime+JARs+to+the+Project+Folder"></a>
+<h4>To Copy Runtime JARs to the Project Folder</h4>
<div style="margin-left: 0 ; border: 2px">
-<p>In this step you will assemble the runtime resources for your Page Flow
application. These resourses consist of runtime JARs, the <netui> tag
library, and deployment configuration files. These resources are loaded into
the application template 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 <span
class="codefrag">WEB-INF/lib</span> folder using the Ant command below.</p>
<p>At the command prompt, enter the following Ant command:</p>
<pre class="code"> ant
-f %BEEHIVE_HOME%\ant\buildWebapp.xml
@@ -534,13 +567,14 @@
<pre class="code">C:
beehive_projects
pageflow_tutorial
- resources
- WEB-INF</pre>
+ WEB-INF
+ lib
+ [many JAR files]</pre>
</div>
-<a name="N10133"></a><a name="To+Create+a+Controller+File"></a>
+<a name="N10184"></a><a name="To+Create+a+Controller+File"></a>
<h4>To Create a Controller File</h4>
<div style="margin-left: 0 ; border: 2px">
-<p>In this step you will create the Controller file in place in the Tomcat
deployment directory.</p>
+<p>In this step you will create the Controller file, the central file on any
Page Flow.</p>
<p>In the directory <span
class="codefrag">C:/beehive_projects/pageflow_tutorial</span>, create a file
named <span class="codefrag">Controller.jpf</span>.</p>
<p>In a text editor (or your IDE of choice), open the file Controller.jpf.</p>
<p>Edit <span class="codefrag">Controller.jpf</span> so it appears as
follows.</p>
@@ -563,7 +597,7 @@
}</pre>
<p>Save and close the file Controller.jpf.</p>
</div>
-<a name="N10157"></a><a name="To+Create+a+JSP+File"></a>
+<a name="N101AA"></a><a name="To+Create+a+JSP+File"></a>
<h4>To Create a JSP File</h4>
<div style="margin-left: 0 ; border: 2px">
<p>In the directory <span
class="codefrag">C:/beehive_projects/pageflow_tutorial</span>, create a file
named <span class="codefrag">index.jsp</span>.</p>
@@ -582,7 +616,7 @@
</netui:body>
</netui:html></pre>
</div>
-<a name="N10172"></a><a name="To+Compile+and+Deploy+the+Page+Flow"></a>
+<a name="N101C5"></a><a name="To+Compile+and+Deploy+the+Page+Flow"></a>
<h4>To Compile and Deploy the Page Flow</h4>
<div style="margin-left: 0 ; border: 2px">
<p>You are now ready to compile the Page Flow and deploy it to Tomcat.</p>
@@ -593,9 +627,7 @@
-Dcontext.path=pageflow_tutorial
build.webapp
deploy</pre>
-<p>TODO: This step is blocked by the following error: BUILD FAILED
C:\beehive-alpha\ant\buildWebappCore.xml:102: srcdir
"C:\beehive_projects\pageflow_tutorial\WEB-INF\src" does not exist!</p>
-<p>WORKAROUND: create the directory
C:/beehive_projects/pageflow_tutorial/WEB-INF/src and recompile.</p>
-<p>Note: if you get an error stating that the <span
class="codefrag">/pageflow_tutorial</span> context path already exists, then
use the following Ant command to first undeploy the application.</p>
+<p>Note: if you get an error stating that the <span
class="codefrag">/pageflow_tutorial</span> context path already exists, then
use the following Ant command to first undeploy the application from Tomcat.
(You might be getting this error if this is your second time running through
the tutorial.)</p>
<pre class="code">ant
-f %BEEHIVE_HOME%\ant\buildWebapp.xml
-Dwebapp.dir=C:\beehive_projects\pageflow_tutorial
@@ -603,7 +635,7 @@
undeploy</pre>
<p>When the undeploy is complete, then compile and deploy again.</p>
</div>
-<a name="N10198"></a><a name="To+Test+the+Page+Flow+Web+Application"></a>
+<a name="N101E5"></a><a name="To+Test+the+Page+Flow+Web+Application"></a>
<h4>To Test the Page Flow Web Application</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Visit the following address:</p>
@@ -614,10 +646,10 @@
</div>
</div>
-<a name="N101AE"></a><a name="step_3"></a>
+<a name="N101FB"></a><a name="step_3"></a>
<h3>Step 3: Navigation</h3>
<div style="margin-left: 0 ; border: 2px">
-<a name="N101B4"></a><a name="To+Create+a+Destination+JSP+Page"></a>
+<a name="N10201"></a><a name="To+Create+a+Destination+JSP+Page"></a>
<h4>To Create a Destination JSP Page</h4>
<div style="margin-left: 0 ; border: 2px">
<p>In the directory <span
class="codefrag">C:/beehive_projects/pageflow_tutorial</span>, create a file
named <span class="codefrag">page2.jsp</span>.</p>
@@ -637,7 +669,7 @@
</netui:html></pre>
<p>Save and close <span class="codefrag">page2.jsp</span>.</p>
</div>
-<a name="N101D2"></a><a name="To+Create+a+Link+to+the+Destination+Page"></a>
+<a name="N1021F"></a><a name="To+Create+a+Link+to+the+Destination+Page"></a>
<h4>To Create a Link to the Destination Page</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Open the file <span
class="codefrag">C:/beehive_projects/pageflow_tutorial/index.jsp</span>.</p>
@@ -661,7 +693,7 @@
</netui:html>
</pre>
</div>
-<a name="N101EA"></a><a name="To+Add+an+Action+Method+to+Handle+the+Link"></a>
+<a name="N10237"></a><a name="To+Add+an+Action+Method+to+Handle+the+Link"></a>
<h4>To Add an Action Method to Handle the Link</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Open the file <span
class="codefrag">C:/beehive_projects/pageflow_tutorial/Controller.jpf</span>.</p>
@@ -695,7 +727,7 @@
}
}</pre>
</div>
-<a name="N10202"></a><a name="To+Compile+and+Redeploy+the+Page+Flow"></a>
+<a name="N1024F"></a><a name="To+Compile+and+Redeploy+the+Page+Flow"></a>
<h4>To Compile and Redeploy the Page Flow</h4>
<div style="margin-left: 0 ; border: 2px">
<p>At the command prompt, enter:</p>
@@ -707,7 +739,7 @@
redeploy
</pre>
</div>
-<a name="N10211"></a><a
name="To+Test+the+Page+Flow+Web+Application-N10203"></a>
+<a name="N1025E"></a><a
name="To+Test+the+Page+Flow+Web+Application-N1024D"></a>
<h4>To Test the Page Flow Web Application</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Visit the following link:
@@ -721,10 +753,10 @@
</div>
</div>
-<a name="N1022A"></a><a name="step_4"></a>
+<a name="N10277"></a><a name="step_4"></a>
<h3>Step 4: Submitting Data</h3>
<div style="margin-left: 0 ; border: 2px">
-<a name="N10230"></a><a name="To+Create+a+Submission+Form"></a>
+<a name="N1027D"></a><a name="To+Create+a+Submission+Form"></a>
<h4>To Create a Submission Form</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Edit the file <span
class="codefrag">C:/beehive_projects/pageflow_tutorial/page2.jsp</span> so it
appears as follows.</p>
@@ -750,7 +782,7 @@
</netui:html></pre>
<p>Save and close <span class="codefrag">page2.jsp</span>.</p>
</div>
-<a name="N10248"></a><a
name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a>
+<a name="N10295"></a><a
name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a>
<h4>To Edit the Controller File to Handle the Submitted Data</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Open the file <span
class="codefrag">C:/beehive_projects/pageflow_tutorial/Controller.jpf</span>
@@ -827,7 +859,7 @@
</pre>
<p>Save and close <span class="codefrag">Controller.jpf</span>.</p>
</div>
-<a name="N10266"></a><a
name="To+Compile+and+Redeploy+the+Page+Flow-N10256"></a>
+<a name="N102B5"></a><a
name="To+Compile+and+Redeploy+the+Page+Flow-N102A2"></a>
<h4>To Compile and Redeploy the Page Flow</h4>
<div style="margin-left: 0 ; border: 2px">
<p>At the command prompt, enter:</p>
@@ -839,7 +871,7 @@
redeploy
</pre>
</div>
-<a name="N10275"></a><a
name="To+Test+the+Page+Flow+Web+Application-N10264"></a>
+<a name="N102C4"></a><a
name="To+Test+the+Page+Flow+Web+Application-N102B0"></a>
<h4>To Test the Page Flow Web Application</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Visit the following link:
@@ -855,16 +887,16 @@
</div>
</div>
-<a name="N10294"></a><a name="step_5"></a>
+<a name="N102E3"></a><a name="step_5"></a>
<h3>Step 5: Processing and Displaying Data</h3>
<div style="margin-left: 0 ; border: 2px">
-<a name="N1029A"></a><a name="To+Process+the+Submitted+Data"></a>
+<a name="N102E9"></a><a name="To+Process+the+Submitted+Data"></a>
<h4>To Process the Submitted Data</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Edit the processData method in the Controller.jpf file so it appears as
follows. Code to add appears in red.</p>
<pre class="code">@Jpf.Action(
forwards = {
- @Jpf.Forward( name = "success", path = "showData.jsp" )
+ @Jpf.Forward( name = "success", path = "displayData.jsp" )
}
)
public Forward processData( ProcessDataForm form )
@@ -875,7 +907,7 @@
return new Forward("success");
}</pre>
</div>
-<a name="N102A9"></a><a
name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a>
+<a name="N102F8"></a><a
name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a>
<h4>To Create a JSP Page to Display Submitted Data</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Create a file named <span class="codefrag">displayData.jsp</span> in the
directory CATALINA_HOME/pageflow_tutorial. Edit <span
class="codefrag">displayData.jsp</span> so it appears as follows.</p>
@@ -883,7 +915,7 @@
<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"
prefix="netui"%>
<netui:html>
<head>
- <title>showData.jsp</title>
+ <title>displayData.jsp</title>
<netui:base/>
</head>
<netui:body>
@@ -892,7 +924,7 @@
</netui:body>
</netui:html></pre>
</div>
-<a name="N102BE"></a><a
name="To+Compile+and+Redeploy+the+Page+Flow-N102AB"></a>
+<a name="N1030D"></a><a
name="To+Compile+and+Redeploy+the+Page+Flow-N102F7"></a>
<h4>To Compile and Redeploy the Page Flow</h4>
<div style="margin-left: 0 ; border: 2px">
<p>At the command prompt, enter:</p>
@@ -904,7 +936,7 @@
redeploy
</pre>
</div>
-<a name="N102CD"></a><a
name="To+Test+the+Page+Flow+Web+Application-N102B9"></a>
+<a name="N1031C"></a><a
name="To+Test+the+Page+Flow+Web+Application-N10305"></a>
<h4>To Test the Page Flow Web Application</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Visit the following link:
@@ -916,11 +948,11 @@
<p>Click the link.</p>
<p>You will be directed to page2.jsp.</p>
<p>Enter values in the Name and Age fields. Click the Submit button.</p>
-<p>You will be forwarded to the showData.jsp page. Notice the values you
entered are displayed.</p>
+<p>You will be forwarded to the displayData.jsp page. Notice the values you
entered are displayed.</p>
</div>
</div>
-<a name="N102EC"></a><a name="summary"></a>
+<a name="N1033B"></a><a name="summary"></a>
<h3>Summary: Page Flow Tutorial</h3>
<div style="margin-left: 0 ; border: 2px">
<p>This tutorial introduced you to the basics of building web applications
with Beehive Page Flows.</p>
Modified:
incubator/beehive/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
==============================================================================
---
incubator/beehive/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
(original)
+++
incubator/beehive/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
Tue Nov 9 15:36:01 2004
@@ -113,8 +113,37 @@
pageflow_tutorial</source>
</section>
<section>
- <title>To Copy the Page Flow Application Template</title>
- <p>In this step you will assemble the runtime resources for
your Page Flow application. These resourses consist of runtime JARs, the
<netui> tag library, and deployment configuration files. These resources are
loaded into the application template using the Ant command below.</p>
+ <title>To Copy Page Flow Resources into the Project
Folder</title>
+ <p>In this step you will copy (most of) the Page Flow
application template into your project folder. The application template gives
the basic directory structure for a Page Flow web app, and it includes some
common resources, for example: image files, supporting JavaScript files, and
web app configuration files.</p>
+ <p>Copy the folder
<code>BEEHIVE_HOME/samples/netui-blank/resources</code> into your project
folder <code>C:\beehive_projects\pageflow_tutorial</code>.</p>
+ <p>Copy the folder
<code>BEEHIVE_HOME/samples/netui-blank/WEB-INF</code> into your project folder
<code>C:\beehive_projects\pageflow_tutorial</code>.</p>
+ <p>Before proceeding, confirm that the following directory structure
exists:</p>
+<source>C:
+ beehive_projects
+ pageflow_tutorial
+ resources
+ WEB-INF</source>
+ <p>Note: do <em>not</em> copy the files <code>Controller.jpf</code>,
<code>index.jsp</code>, or <code>error.jsp</code>. For the sake of
instruction, you will create these files from scratch in the steps below. </p>
+ <p>If you see the following directory structure you have made a mistake.</p>
+ <source>C:
+ beehive_projects
+ pageflow_tutorial
+ resource
+ WEB-INF
+ Controller.jpf - WRONG!
+ error.jsp - WRONG!
+ index.jsp - WRONG!</source>
+ <p>Note: do <em>not</em> copy the folder <code>netui-blank</code> into your
project folder.</p>
+ <p>If you see the following directory structure you have made a mistake.</p>
+ <source>C:
+ beehive_projects
+ pageflow_tutorial
+ netui-blank - WRONG!</source>
+<p></p>
+ </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>At the command prompt, enter the following Ant command:</p>
<source> ant
-f %BEEHIVE_HOME%\ant\buildWebapp.xml
@@ -124,12 +153,13 @@
<source>C:
beehive_projects
pageflow_tutorial
- resources
- WEB-INF</source>
+ WEB-INF
+ lib
+ [many JAR files]</source>
</section>
<section>
<title>To Create a Controller File</title>
- <p>In this step you will create the Controller file in place
in the Tomcat deployment directory.</p>
+ <p>In this step you will create the Controller file, the
central file on any Page Flow.</p>
<p>In the directory
<code>C:/beehive_projects/pageflow_tutorial</code>, create a file named
<code>Controller.jpf</code>.</p>
<p>In a text editor (or your IDE of choice), open the file
Controller.jpf.</p>
<p>Edit <code>Controller.jpf</code> so it appears as
follows.</p>
@@ -150,6 +180,7 @@
return new Forward("success");
}
}]]></source>
+ <!--<p>[todo: what is this code doing?]</p>-->
<p>Save and close the file Controller.jpf.</p>
</section>
<section>
@@ -180,9 +211,7 @@
-Dcontext.path=pageflow_tutorial
build.webapp
deploy</source>
-<p>TODO: This step is blocked by the following error: BUILD FAILED
C:\beehive-alpha\ant\buildWebappCore.xml:102: srcdir
"C:\beehive_projects\pageflow_tutorial\WEB-INF\src" does not exist!</p>
-<p>WORKAROUND: create the directory
C:/beehive_projects/pageflow_tutorial/WEB-INF/src and recompile.</p>
-<p>Note: if you get an error stating that the <code>/pageflow_tutorial</code>
context path already exists, then use the following Ant command to first
undeploy the application.</p>
+<p>Note: if you get an error stating that the <code>/pageflow_tutorial</code>
context path already exists, then use the following Ant command to first
undeploy the application from Tomcat. (You might be getting this error if this
is your second time running through the tutorial.)</p>
<source>ant
-f %BEEHIVE_HOME%\ant\buildWebapp.xml
-Dwebapp.dir=C:\beehive_projects\pageflow_tutorial
@@ -395,6 +424,7 @@
}
}
]]></source>
+ <!--<p>[TODO: what is this code doing?]</p>-->
<p>Save and close <code>Controller.jpf</code>.</p>
</section>
<section>
@@ -427,7 +457,7 @@
<p>Edit the processData method in the Controller.jpf file so
it appears as follows. Code to add appears in red.</p>
<source><[EMAIL PROTECTED](
forwards = {
- @Jpf.Forward( name = "success", path = "showData.jsp" )
+ @Jpf.Forward( name = "success", path = "displayData.jsp" )
}
)
public Forward processData( ProcessDataForm form )
@@ -445,7 +475,7 @@
<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<netui:html>
<head>
- <title>showData.jsp</title>
+ <title>displayData.jsp</title>
<netui:base/>
</head>
<netui:body>
@@ -474,7 +504,7 @@
<p>Click the link.</p>
<p>You will be directed to page2.jsp.</p>
<p>Enter values in the Name and Age fields. Click the Submit
button.</p>
- <p>You will be forwarded to the showData.jsp page. Notice the
values you entered are displayed.</p>
+ <p>You will be forwarded to the displayData.jsp page. Notice
the values you entered are displayed.</p>
</section>
</section>
<section id="summary">