You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2004/10/14 01:23:55 UTC

svn commit: rev 54757 - in incubator/beehive/trunk/site/src/documentation/content/xdocs: . controls

Author: steveh
Date: Wed Oct 13 16:23:54 2004
New Revision: 54757

Modified:
   incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml
   incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml
Log:
Adding controls tutorial to forrest src.


Modified: incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml
==============================================================================
--- incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml	(original)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/controls/tutorial_controls.xml	Wed Oct 13 16:23:54 2004
@@ -23,16 +23,17 @@
         <section id="step1">
             <title>Step 1: Begin the Controls Tutorial</title>
             <section>
-                <title/>
+                <title>Note on the current state of the Controls tutorial</title>
+                <p>The Control Tutorial is a work in progress.  Please email comments to Steve Hanson at <code>steveh at bea.com</code>.</p>
             </section>
             <section>
                 <title>Download and Install JDK5</title>
                 <p>If you do not have JDK5 installed on your machine, visit <fork href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</fork> and download the latest version of JDK5.</p>
-                <p>[tbd]</p>
+                <p><!--[tbd: better instructions]--></p>
             </section>
             <section>
                 <title>Download and Install SVN (Subversion Source Control)</title>
-                <p>Visit <fork href="http://subversion.tigris.org">http://subversion.tigris.org</fork> and install the SVN source control system.[tbd]</p>
+                <p>Visit <fork href="http://subversion.tigris.org">http://subversion.tigris.org</fork> and install the SVN source control system.<!--[tbd]--></p>
             </section>
             <section>
                 <title>Download and Install Beehive</title>
@@ -48,7 +49,7 @@
                 </p>
             </section>
             <section>
-                <title>Install ANT</title>
+                <title>Install ANT </title>
                 <p>Create a directory named <code>installed</code>at <code>C:/beehive-src/trunk/installed</code>.</p>
                 <p>Unzip the file <code>C:/beehive-src/trunk/external/ant/apache-ant-1.6.2-bin.zip</code> into <code>C:/beehive-src/Beehive/installed</code>.</p>
                 <p>After the file has unzipped, confirm that the following directory structure exists: <code>C:/beehive-src/trunk/installed/apache-ant-1.6.2</code>.</p>
@@ -65,17 +66,19 @@
                 </p>
                 <p>At the command prompt, enter: <code>ant bootstrap</code>
                 </p>
-                <p>At the command prompt, enter: <code>exit</code>
+            </section>
+            <section>
+                <title>Compile Beehive</title>
+                <p>At the command prompt, enter: <code>ant deploy</code>
                 </p>
+                <p>Leave this command shell open so you can use it throughout the tutorial.</p>
             </section>
         </section>
         <section id="step_2">
             <title>Step 2: Create Control Implementation and Interface Files</title>
             <section>
                 <title>Introduction</title>
-                <p>
-					[tbd]
-				</p>
+                <p>[tbd]</p>
             </section>
             <section>
                 <title>To Create a Control's Implementation File</title>
@@ -102,7 +105,7 @@
             </section>
             <section>
                 <title>To Create the Control's Interface File</title>
-                <p>The interface file is a JAVA file, that defines the public face of your control. [tbd]</p>
+                <p>The interface file is a JAVA file, that defines the public face of your control. <!--[tbd]--></p>
                 <p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, create a file named <code>Hello.java</code>.</p>
                 <p>Edit index.jsp so it looks like the following.</p>
                 <source><![CDATA[ 
@@ -119,33 +122,17 @@
             </section>
             <section>
                 <title>To Create the WEB-INF directory</title>
-                <p>	Open a command shell.</p>
-                <p>At the command prompt, enter:  <code>set JAVA_HOME=C:\jdk1.5.0</code>
-                </p>
-                <p>At the command prompt, enter:  <code>cd C:\beehive-src\trunk</code>
-                </p>
-                <p>At the command prompt, enter: <code>beehiveEnv.cmd</code>
-                </p>
-                <p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\netui\ant</code>
-                </p>
-                <p>At the command prompt, enter: <code>ant -f webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
+                <p>At the command prompt, enter: <code>ant -f C:\beehive-src\trunk\netui\ant\webappTemplate.xml -Dwebapp.dist.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
                 </p>
             </section>
             <section>
-                <title>Compile the Control</title>
-                <p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\test\ant</code>
-                </p>
-                <p>At the command prompt, enter: <code>ant -f buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
-                </p>
-            </section>
-            <section>
-                <title>Create a JSP Page to Test the Control</title>
+                <title>Edit a JSP Page to Test the Control</title>
                 <p>To test your Beehive Control, you need to call the control from some other resource, such as a JAVA application, JSP page, or Page Flow web application.  In this step you will call the 
 				control from a JSP page.
 				</p>
-                <p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, create a file named <code>HelloPage.jsp</code>.
+                <p>In the directory <code>C:/beehive-src/trunk/installed/jakarta-tomcat-5.0.25/webapps/control_tutorial</code>, edit the file named <code>index.jsp</code>.
 				</p>
-                <p>HelloPage.jsp so it appears as follows.</p>
+                <p>Edit index.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-databinding-1.0" prefix="netui-data"%>
@@ -158,29 +145,33 @@
   </head>
   <netui:body>
     <p>
-      <jsp:useBean class="hellocontrol.Hello" id="helloBean" scope="session"/>
-	<jsp:getProperty name="helloBean" property="hello"/>
+      <jsp:useBean class="hellocontrol.HelloBean" id="helloBean" scope="session"/>
+	<%= helloBean.hello() %>
     </p>
   </netui:body>
 </netui:html>
-				]]></source>
+			]]></source>
             </section>
             <section>
-                <title>To Start the Tomcat Server</title>
-                <p>At the command prompt, enter: <code>cd C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin</code>
+                <title>Compile the Control</title>
+                <p>At the command prompt, enter: <code>ant -f C:\beehive-src\trunk\test\ant\buildWebapp.xml build.webapp -Dwebapp.dir=C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\webapps\control_tutorial</code>
                 </p>
-                <p>At the command prompt, enter: <code>startup.bat</code>
+            </section>
+            <section>
+                <title>To Start the Tomcat Server</title>
+                <p>At the command prompt, enter: <code>C:\beehive-src\trunk\installed\jakarta-tomcat-5.0.25\bin\startup.bat</code>
                 </p>
-                <p>Leave this command shell open, so that you can stop and restart Tomcat when necessary.</p>
             </section>
             <section>
                 <title>To Test the Control</title>
-                <p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/control_tutorial</code>
+                <p>Open a web browser and enter the following in the address bar: <code>http://localhost:8080/control_tutorial/index.jsp</code>
                 </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>
             </section>
         </section>
-        <section id="step_3">
+        <!--<section id="step_3">
             <title>Step 3: Navigation</title>
             <section>
                 <title>Create a Destination JSP Page</title>
@@ -492,7 +483,7 @@
                 <li>User input data is data bound to Form Beans before the data is submitted to an Action method.</li>
                 <li>You can use the &lt;netui...> tag library to data bind to Java objects and render them as HTML</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/>

Modified: incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml
==============================================================================
--- incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml	(original)
+++ incubator/beehive/trunk/site/src/documentation/content/xdocs/site.xml	Wed Oct 13 16:23:54 2004
@@ -13,7 +13,7 @@
             <!--<pageflow_programming label="Page Flow Programming" href="pageflow/guide.html"/>-->
         </pageflow>
         <controls label="Controls">
-            <!--<tutorial_control label="Control Tutorial" href="controls/tutorial_controls.html"/>-->
+            <tutorial_control label="Control Tutorial" href="controls/tutorial_controls.html"/>
             <control_overview label="Control Programming" href="Controls.html"/>
         </controls>
         <wsm label="Web Services">