Author: steveh
Date: Tue Jan  4 14:46:12 2005
New Revision: 124166

URL: http://svn.apache.org/viewcvs?view=rev&rev=124166
Log:
Fix for BEEHIVE-107: control tutorial produces a webapp that doesn't run NetUI 
tags


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

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml?view=diff&rev=124166&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml&r1=124165&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml&r2=124166
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
 Tue Jan  4 14:46:12 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>Beehive Controls Tutorial</title>
@@ -28,7 +28,7 @@
             <title>Step 1: Begin the Page Flow Tutorial</title>
             <section>
                 <title>To Set up the Development Environment</title>
-                <p>Follow the setup directions at <fork 
href="../setup.html">Beehive Installation and Setup</fork></p>
+                <p>Follow the setup directions at <a class="fork" 
href="../setup.html">Beehive Installation and Setup</a></p>
                 <p>After completing the instructions, leave the command shell 
open to use throughout this tutorial.</p>
             </section>
 
@@ -57,30 +57,39 @@
             <title>Step 2: Create Control Implementation and Interface 
Files</title>
             <section>
                 <title>Introduction</title>
-                <p>A Beehive Control consists of two files: an interface file 
(with the JAVA file extension) and an implementation file (with the JCS file 
extension).  The interface file is the public face of your control.  It lists 
all of the methods which can be invoked by users.  The implementation file 
contains the implementation code for the methods listed in the interface 
file.</p>
+                <p>A Beehive Control consists of two files: an interface file 
(with the JAVA file extension) 
+                                       and an implementation file (with the 
JCS file extension).  The interface file is the public face of your control.  
It lists all of the methods which can be invoked by users.  The implementation 
file contains the implementation code for the methods listed in the interface 
file.</p>
             </section>
             <section>
                 <title>Make a Project Folder</title>
+                           <p>In this task you will make a project folder that 
contains web application resourcs.  You 
+                                       might be asking yourself, <em>Why would 
I need web application resources in a control
+                                       tutorial?</em>  The answer is that 
developing your control within a web app
+                                       makes it much easier to test your 
control as you go.</p>        
                 <p>On your C: drive, create a directory called 
<code>beehive_projects</code>.</p>
-                <p>In the <code>beehive_projects</code> directory, create a 
directory called control_tutorial.</p>
-                <p>Before proceeding, confirm that the following directory 
structure exists:</p>
+                <p>Copy the folder 
<code>BEEHIVE_HOME/samples/netui-blank</code> into 
<code>C:/beehive_projects</code>.</p>
+                               <p>Rename the folder 
C:/beehive_projects/<strong>netui-blank</strong> to the name 
+                                       
C:/beehive_projects/<strong>control_tutorial</strong></p>
+                               <p>Before proceeding, confirm that the 
following directory structure exists:</p>
             <source>C:
   beehive_projects
     control_tutorial</source>
-            </section>
-            <section>
-                <title>To Add Beehive Runtime JARs to Your Application.</title>
-                <p>In this step you will assemble the runtime resources for 
your Control.  Most of these files are included in the WEB-INF directory.  It 
includes JAR files with the JSP tag handler classes, the Controls runtime JAR, 
etc. <!--[tbd: for a complete list see...]--></p>
-                <p>Using the command shell opened in the previous step, at the 
command prompt, enter: </p>
-                <source>  ant 
+<section>
+       <title>To Add Beehive Runtime JARs to Your Project Folder</title>
+       <p>In this step you will assemble the runtime resources for your 
Control. 
+               Most of these files are included in the WEB-INF directory. 
+               It includes JAR files with the JSP tag handler classes, the 
Controls runtime JAR, etc.</p>
+       <p>Using the command shell opened in the previous step, at the command 
prompt, enter:   </p>
+       <source>  ant 
     -f %BEEHIVE_HOME%\ant\buildWebapp.xml
     -Dwebapp.dir=C:\beehive_projects\control_tutorial 
-    deploy.beehive.webapp.runtime </source>
+    deploy.beehive.webapp.runtime 
+       </source>
+</section>
             </section>            
             <section>
                 <title>To Create the Control's Implementation File</title>
                 <p>In this step you will create the implementation file for 
your Beehive Control.  This is a Java class (although it has the JCS file 
extension) that contains the bulk of your Control's working code.</p>
-                <p>In the directory 
<code>C:/beehive_projects/control_tutorial/WEB-INF</code>, create a directory 
called <code>src</code>.</p>
                 <p>In the directory 
<code>C:/beehive_projects/webapps/control_tutorial/WEB-INF/src</code>, create a 
directory called <code>hellocontrol</code>.</p>
                 <p>In the directory 
<code>C:/beehive_projects/webapps/control_tutorial/WEB-INF/src/hellocontrol</code>,
 create a file called <code>HelloImpl.jcs</code>.</p>
                 <p>Before proceeding, confirm that the following directory 
structure exists:</p>
@@ -130,21 +139,26 @@
                                </p>
                 <p>In the directory 
<code>C:/beehive_projects/control_tutorial</code>, create a file named 
<code>hello.jsp</code>.
                                </p>
-                <p>Edit hello.jsp so it appears as follows.</p>
-                <source><![CDATA[<%@ page language="java" 
contentType="text/html;charset=UTF-8"%>
-<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; prefix="netui"%>
-<netui:html>
-  <head>
-    <title>Control Tutorial Test Page</title>
-  </head>
-  <netui:body>
-    <jsp:useBean class="hellocontrol.HelloBean" id="helloBean" 
scope="session"/>
-    <h3>Control Tutorial Test Page</h3>
-    <p>
-        Response from the hello() method on the Hello Control: <strong> <%= 
helloBean.hello() %> </strong>
-    </p>
-  </netui:body>
-</netui:html>]]></source>
+                <p>Edit hello.jsp so it appears as follows.  Code to edit 
appears in bold.</p>
+<source>
+&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"; 
prefix="netui-data"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"; 
prefix="netui-template"%>
+&lt;netui:html>
+  &lt;head>
+    &lt;title><strong>Control Tutorial Test Page</strong>&lt;/title>
+    &lt;netui:base/>
+  &lt;/head>
+  &lt;netui:body>
+    <strong>&lt;jsp:useBean class="hellocontrol.HelloBean" id="helloBean" 
scope="session"/>
+    &lt;h3>Control Tutorial Test Page&lt;/h3></strong>
+    &lt;p>
+        <strong>Response from the hello() method on the Hello Control: 
&lt;strong> &lt;%= helloBean.hello() %> &lt;/strong></strong>
+    &lt;/p>
+  &lt;/netui:body>
+&lt;/netui:html>
+</source>
             </section>
             <section>
                 <title>To Compile and Deploy the Control</title>
@@ -167,8 +181,8 @@
             </section>
             <section>
                 <title>To Test the Control</title>
-                <p>Open a web browser and enter the following in the address 
bar: <fork 
href="http://localhost:8080/control_tutorial/hello.jsp";>http://localhost:8080/control_tutorial/hello.jsp</fork>
-                </p>
+                <p>Open a web browser and enter the following in the address 
bar:</p>
+                               <p class="quote"><a class="fork" 
href="http://localhost:8080/control_tutorial/index.jsp";>http://localhost:8080/control_tutorial/index.jsp</a></p>
                 <p>You will be directed to the index.jsp page.</p>
                 <p>Note the message on the page: "Hello, World!"</p>
                 <p>This message is provided by the Hello control.</p>
@@ -178,7 +192,7 @@
                 <title>Step 3: Add a Parameterized Method to the 
Control</title>
                 <section>
                     <title>To edit the Interface and Implementation 
Files</title>
-                    <p>Edit <code>HelloImpl.jcs</code> so it appears as 
follows.  Code to add appears in bold type.</p>
+                    <p>Edit <code>HelloImpl.jcs</code> so it appears as 
follows.  Code to add appears in bold.</p>
 <source>package hellocontrol; 
 
 import org.apache.beehive.controls.api.bean.*;
@@ -196,8 +210,8 @@
         return "Hello, " + name + "!";
     }</strong>
 }</source>
-<p>Save an close <code>HelloImpl.jcs</code></p>
-<p>Edit <code>Hello.java</code> so it appears as follows.  Code to add appears 
in bold type.</p>
+<p>Save and close <code>HelloImpl.jcs</code></p>
+<p>Edit <code>Hello.java</code> so it appears as follows.  Code to add appears 
in bold.</p>
 <source>package hellocontrol; 
 
 import org.apache.beehive.controls.api.bean.ControlInterface;
@@ -213,7 +227,7 @@
 
 <section>
     <title>To Edit the Test JSP Page</title>
-    <p>Edit <code>hello.jsp</code> so it appears as follows.  Code to add 
appears in bold type.</p>
+    <p>Edit <code>index.jsp</code> so it appears as follows.  Code to add 
appears in bold.</p>
     <source>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%>
 &lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
 &lt;netui:html>
@@ -231,11 +245,11 @@
     &lt;/p></strong>
   &lt;/netui:body>
 &lt;/netui:html></source>
-    <p>Save and close <code>hello.jsp</code></p>
+    <p>Save and close <code>index.jsp</code></p>
 </section>
 <section>
     <title>To Compile and Redeploy the Control</title>
-<p>Compile and redeploy the control with the following And command:</p>
+<p>Compile and redeploy the control with the following Ant command:</p>
 
                 <source>  ant 
     -f %BEEHIVE_HOME%\ant\buildWebapp.xml 
@@ -248,7 +262,8 @@
 
             <section>
                 <title>To Test the Control</title>
-                <p>Open a web browser and enter the following in the address 
bar: <fork 
href="http://localhost:8080/control_tutorial/hello.jsp";>http://localhost:8080/control_tutorial/hello.jsp</fork>
+                <p>Open a web browser and enter the following in the address 
bar:</p> 
+                               <p class="quote"><a class="fork" 
href="http://localhost:8080/control_tutorial/index.jsp";>http://localhost:8080/control_tutorial/index.jsp</a>
                 </p>
                 <p>You will be directed to the index.jsp page.</p>
                 <p>Note the messages on the page: "Hello, World!" and "Hello, 
Moon!"</p>

Reply via email to