Author: steveh Date: Mon Jan 24 15:45:57 2005 New Revision: 126328 URL: http://svn.apache.org/viewcvs?view=rev&rev=126328 Log: (1) Updating the controls and pageflow tutorials. (2) Refining the CSS sheet. Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.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=126328&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml&r1=126327&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml&r2=126328 ============================================================================== --- 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 Mon Jan 24 15:45:57 2005 @@ -19,10 +19,6 @@ <li>How to create custom metadata annotations</li> </ul> </section> - <section> - <title>Assumptions Made in This Tutorial</title> - <p>The following tutorial assumes that you are working on a Windows machine. But, with a little common sense, it is easy to run through the tutorial on a Unix machine. For example, when the tutorial tells you to run the file beehiveUser.cmd, Unix users should run the file beehiveUser.sh.</p> - </section> </section> <section id="step1"> <title>Step 1: Begin the Page Flow Tutorial</title> @@ -177,11 +173,9 @@ -Dwebapp.dir=C:\beehive_projects\control_tutorial build</source> <p>To deploy the web application (with the control imbedded in it), click the following link.</p> - <source> - <a - class="fork" - href="http://localhost:8080/manager/deploy?path=/control_tutorial&war=file:C:/beehive_projects/control_tutorial&update=true">http://localhost:8080/manager/deploy?path=/control_tutorial&war=file:C:/beehive_projects/control_tutorial&update=true</a> - </source> + <p class="quote"> + <a class="fork" href="http://localhost:8080/manager/deploy?path=/control_tutorial&war=file:C:/beehive_projects/control_tutorial&update=true">http://localhost:8080/manager/deploy?path=/control_tutorial&war=file:C:/beehive_projects/control_tutorial&update=true</a> + </p> <p>If you are prompted for a username/password, enter: manager/manager</p> <p>(For an explanation of this method of deploying an application to Tomcat, see the Tomcat 5 documentation: 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&rev=126328&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml&r1=126327&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml&r2=126328 ============================================================================== --- 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 Jan 24 15:45:57 2005 @@ -18,40 +18,74 @@ <li>How Page Flows help to separate data processing and data presentation</li> </ul> </section> - <section> - <title>Assumptions Made in This Tutorial</title> - <p>The following tutorial assumes that you are working on a Windows machine. But, with a little common sense, it is easy to run through the tutorial on a Unix machine. For example, when the tutorial tells you to run the file beehiveUser.cmd, Unix users should run the file beehiveUser.sh.</p> - </section> </section> - <section id="step1"> + <section id="step1_begin"> <title>Step 1: Begin the Page Flow Tutorial</title> <section> <title>To Set up the Development Environment</title> - <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> - <section> - <title>Add a Manager Role to Tomcat</title> - <p>Adding the manager role to Tomcat server allows you to run deploy related targets in the Ant file <code>runTomcat.xml</code>. This file is provided as a convenience for managing the Tomcat server.</p> - <p>Edit the file <code>CATALINA_HOME/conf/tomcat-users.xml</code> so it appears as follows. Code to add appears in bold type.</p> - <source><?xml version='1.0' encoding='utf-8'?> -<tomcat-users> - <role rolename="tomcat"/> - <role rolename="role1"/> - <strong><role rolename="manager"/></strong> - <user username="tomcat" password="tomcat" roles="tomcat"/> - <user username="role1" password="tomcat" roles="role1"/> - <user username="both" password="tomcat" roles="tomcat,role1"/> - <strong><user username="manager" password="manager" roles="manager"/></strong> -</tomcat-users></source> - </section> + <p>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>TOMCAT_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> + <!-- + <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 TOMCAT_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> <p>At the command prompt, enter:</p> - <source>%CATALINA_HOME%\bin\startup.bat</source> + <source>%TOMCAT_HOME%\bin\startup.bat</source> </section> </section> - <section id="step_2"> + <section id="step_2_create"> <title>Step 2: Create a New Page Flow Application</title> <section> <title>Introduction</title> @@ -68,49 +102,30 @@ <section> <title>Make a Project Folder</title> <p>On your C: drive, create a directory named <code>beehive_projects</code>.</p> - <p>In the <code>beehive_projects</code> directory, create a directory named <code>pageflow_tutorial</code></p> - <p>Before proceeding, confirm that the following directory structure exists:</p> + <p>Copy the folder <code><BeehiveRoot>/samples/netui-blank</code> into + <code>C:/beehive_projects</code>. (<code><BeehiveRoot></code> refers to the + top level folder of your Beehive installation.)</p> + <p>Rename the folder + <code>C:/beehive_projects/</code><strong><code>netui-blank</code></strong> to the name + <code>C:/beehive_projects/</code><strong><code>pageflow_tutorial</code></strong></p> + <p>Before proceeding, confirm that the following directory structure exists:</p> <source>C: beehive_projects - pageflow_tutorial</source> - </section> - <section> - <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> + Controller.jpf + error.jsp + index.jsp</source> + </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\webappRuntimeCore.xml - -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial - deploy.beehive.webapp.runtime</source> + <source>ant + -f <BeehiveRoot>\ant\webappRuntimeCore.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + deploy.beehive.webapp.runtime</source> <p>Before proceeding, confirm that the following directory structure exists:</p> <source>C: beehive_projects @@ -120,70 +135,83 @@ [many JAR files]</source> </section> <section> - <title>To Create a Controller File</title> - <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> - <source><![CDATA[import org.apache.beehive.netui.pageflow.PageFlowController; + <title>To Examine the <code>Controller.jpf</code> and <code>index.jsp</code> Files</title> + <p>There are no edits to make in this step. The point of this step is + to learn about the code you are about to run.</p> + <p><strong><code>Controller.jpf</code></strong></p> + <source>import javax.servlet.http.HttpSession; + import org.apache.beehive.netui.pageflow.Forward; +import org.apache.beehive.netui.pageflow.PageFlowController; import org.apache.beehive.netui.pageflow.annotations.Jpf; - [EMAIL PROTECTED] -public class Controller extends PageFlowController + [EMAIL PROTECTED]( + simpleActions={ + @Jpf.SimpleAction(name="begin", path="index.jsp") + }, + sharedFlowRefs={ + @Jpf.SharedFlowRef(name="shared", type=shared.SharedFlow.class) + } +) +public class Controller + extends PageFlowController { - @Jpf.Action( - forwards={ - @Jpf.Forward(name="success", path="index.jsp") - } - ) - protected Forward begin() + @Jpf.SharedFlowField(name="shared") + private shared.SharedFlow sharedFlow; + + /** + * Callback that is invoked when this controller instance is created. + */ + protected void onCreate() { - return new Forward("success"); } -}]]></source> + + /** + * Callback that is invoked when this controller instance is destroyed. + */ + protected void onDestroy(HttpSession session) + { + } +}</source> + + <p><strong><code>index.jsp</code></strong></p> + <source><%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> +<netui:html> + <head> + <title>Web Application Page</title> + <netui:base/> + </head> + <netui:body> + <p> + New Web Application Page + </p> + </netui:body> +</netui:html> +</source> + <!--<p>[todo: what is this code doing?]</p>--> - <p>Save and close the file Controller.jpf.</p> - </section> - <section> - <title>To Create a JSP File</title> - <p>In the directory <code>C:/beehive_projects/pageflow_tutorial</code>, create a file named <code>index.jsp</code>.</p> - <p>Edit <code>index.jsp</code> so it looks like the following.</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>index.jsp</title> - <netui:base/> - </head> - <netui:body> - <p> - index.jsp - </p> - </netui:body> -</netui:html>]]></source> - </section> + </section> <section> <title>To Compile and Deploy the Page Flow</title> <p>You are now ready to compile the Page Flow and deploy it to Tomcat.</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\pageflow_tutorial - -Dcontext.path=pageflow_tutorial - build - deploy</source> -<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 - undeploy, build, and deploy the application on Tomcat. (You might be getting - this error if this is your second time running through the tutorial.)</p> + <p>At the command prompt, enter:</p> <source>ant - -f %BEEHIVE_HOME%\ant\buildWebapp.xml - -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial - -Dcontext.path=pageflow_tutorial - build - undeploy - deploy</source> + -f <BeehiveRoot>\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + build</source> + <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 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> + </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 Test the Page Flow Web Application</title> @@ -192,12 +220,13 @@ <p>You will be directed to the <code>index.jsp</code> page.</p> </section> </section> - <section id="step_3"> + <section id="step_3_nav"> <title>Step 3: Navigation</title> <section> <title>To Create a Destination JSP Page</title> <p>In the directory <code>C:/beehive_projects/pageflow_tutorial</code>, create a file named <code>page2.jsp</code>.</p> - <p>Edit page2.jsp so it looks like the following.</p> + <p>Edit page2.jsp so it appears as follows.</p> + <p><strong><code>page2.jsp</code></strong></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> @@ -217,17 +246,19 @@ <title>To Create a Link to the Destination Page</title> <p>Open the file <code>C:/beehive_projects/pageflow_tutorial/index.jsp</code>.</p> <p>Edit <code>index.jsp</code> so it appears as follows. Code to add appears in bold type.</p> - <source> -<%@ page language="java" contentType="text/html;charset=UTF-8"%> + <p><strong><code>index.jsp</code></strong></p> + <source><%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> +<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%> <netui:html> <head> - <title>index.jsp</title> + <title>Web Application Page</title> <netui:base/> </head> <netui:body> <p> - index.jsp + New Web Application Page </p> <strong><p> <netui:anchor action="toPage2">Link to page2.jsp</netui:anchor> @@ -237,48 +268,44 @@ </source> </section> <section> - <title>To Add an Action Method to Handle the Link</title> + <title>To Add a Simple Action to Handle the Link</title> <p>Open the file <code>C:/beehive_projects/pageflow_tutorial/Controller.jpf</code>.</p> - <p>Edit <code>Controller.jpf</code> so it appears as follows.</p> - <source>import org.apache.beehive.netui.pageflow.PageFlowController; + <p>Edit <code>Controller.jpf</code> so it appears as follows. Don't forget + the comma after the first <code>Jpf.SimpleAction(...)</code> element!</p> + <p><strong><code>Controller.jpf</code></strong></p> + <source>import javax.servlet.http.HttpSession; + import org.apache.beehive.netui.pageflow.Forward; +import org.apache.beehive.netui.pageflow.PageFlowController; import org.apache.beehive.netui.pageflow.annotations.Jpf; [EMAIL PROTECTED] -public class Controller extends PageFlowController -{ - @Jpf.Action( - forwards={ - @Jpf.Forward(name="success", path="index.jsp") - } - ) - protected Forward begin() - { - return new Forward("success"); [EMAIL PROTECTED]( + simpleActions={ + @Jpf.SimpleAction(name="begin", path="index.jsp")<strong>, + @Jpf.SimpleAction(name="toPage2", path="page2.jsp")</strong> + }, + sharedFlowRefs={ + @Jpf.SharedFlowRef(name="shared", type=shared.SharedFlow.class) } - - <strong>@Jpf.Action( - forwards={ - @Jpf.Forward(name="success", path="page2.jsp") - } - ) - public Forward toPage2() - { - return new Forward("success"); - }</strong> +) +public class Controller + extends PageFlowController +{ + ... }</source> </section> <section> <title>To Compile and Redeploy the Page Flow</title> <p>At the command prompt, enter:</p> <source>ant - -f %BEEHIVE_HOME%\ant\buildWebapp.xml - -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial - -Dcontext.path=pageflow_tutorial - build - undeploy - deploy</source> - </section> + -f <BeehiveRoot>\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + build</source> + <p>To deploy the web application, click the following link. (Or, if you have the link below + open in a dedicated browser window, refresh that browser window.)</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> + </p></section> <section> <title>To Test the Page Flow Web Application</title> <p>Visit the following link: @@ -289,11 +316,12 @@ <p>You will be directed to page2.jsp.</p> </section> </section> - <section id="step_4"> + <section id="step_4_forms"> <title>Step 4: Submitting Data</title> <section> <title>To Create a Submission Form</title> <p>Edit the file <code>C:/beehive_projects/pageflow_tutorial/page2.jsp</code> so it appears as follows.</p> + <p><strong><code>page2.jsp</code></strong></p> <source><%@ page language="java" contentType="text/html;charset=UTF-8"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> <netui:html> @@ -307,11 +335,11 @@ </p> <strong><p> <netui:form action="processData"> - <p>Name:<netui:textBox dataSource="actionForm.name"/> - <p>Age:<netui:textBox dataSource="actionForm.age"/> - <p><netui:button type="submit">Submit</netui:button> + Name:<netui:textBox dataSource="actionForm.name"/><br/> + Age:<netui:textBox dataSource="actionForm.age"/><br/> + <netui:button type="submit">Submit</netui:button> </netui:form> - </p></strong> + </p></strong> </netui:body> </netui:html></source> <p>Save and close <code>page2.jsp</code>.</p> @@ -323,7 +351,9 @@ <p>In the directory <code>C:/beehive_projects/pageflow_tutorial/WEB-INF/src</code> create a directory named <code>forms</code>.</p> <p>In the directory <code>C:/beehive_projects/pageflow_tutorial/WEB-INF/src/forms</code> create a JAVA file named <code>ProfileForm.java</code>.</p> <p>Edit <code>C:/beehive_projects/pageflow_tutorial/WEB-INF/src/forms/ProfileForm.java</code> so it appears as follows.</p> - <source>package forms; + + <p><strong><code>ProfileForm.java</code></strong></p> + <source>package forms; public class ProfileForm { @@ -357,34 +387,27 @@ <p>Open the file <code>C:/beehive_projects/pageflow_tutorial/Controller.jpf</code> </p> <p>Edit <code>Controller.jpf</code> so it appears as follows. Code to add appears in bold type.</p> - <source>import org.apache.beehive.netui.pageflow.Forward; + + <p><strong><code>Controller.jpf</code></strong></p> + <source>import javax.servlet.http.HttpSession; + +import org.apache.beehive.netui.pageflow.Forward; import org.apache.beehive.netui.pageflow.PageFlowController; import org.apache.beehive.netui.pageflow.annotations.Jpf; -<strong>import forms.ProfileForm;</strong> - [EMAIL PROTECTED] -public class Controller extends PageFlowController -{ - @Jpf.Action( - forwards={ - @Jpf.Forward(name="success", path="index.jsp") - } - ) - public Forward begin() - { - return new Forward("success"); - } +import forms.ProfileForm; - @Jpf.Action( - forwards={ - @Jpf.Forward(name="success", path="page2.jsp") - } - ) - public Forward toPage2() - { - return new Forward("success"); [EMAIL PROTECTED]( + simpleActions={ + @Jpf.SimpleAction(name="begin", path="index.jsp"), + @Jpf.SimpleAction(name="toPage2", path="page2.jsp") + }, + sharedFlowRefs={ + @Jpf.SharedFlowRef(name="shared", type=shared.SharedFlow.class) } - +) +public class Controller + extends PageFlowController +{ <strong>@Jpf.Action( forwards = { @Jpf.Forward(name = "success", path = "page2.jsp") @@ -396,22 +419,40 @@ System.out.println("Age: " + form.getAge()); return new Forward("success"); }</strong> + + @Jpf.SharedFlowField(name="shared") + private shared.SharedFlow sharedFlow; + + /** + * Callback that is invoked when this controller instance is created. + */ + protected void onCreate() + { + } + + /** + * Callback that is invoked when this controller instance is destroyed. + */ + protected void onDestroy(HttpSession session) + { + } }</source> <!--<p>[TODO: what is this code doing?]</p>--> <p>Save and close <code>Controller.jpf</code>.</p> </section> - <section> + <section id="compile_redeploy"> <title>To Compile and Redeploy the Page Flow</title> <p>At the command prompt, enter:</p> <source>ant - -f %BEEHIVE_HOME%\ant\buildWebapp.xml - -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial - -Dcontext.path=pageflow_tutorial - build - undeploy - deploy</source> - </section> - <section> + -f <BeehiveRoot>\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + build</source> + <p>To deploy the web application, click the following link. (Or, if you have the link below + open in a dedicated browser window, refresh that browser window.)</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> + </p></section> + <section id="test"> <title>To Test the Page Flow Web Application</title> <p>Visit the following link: </p> @@ -423,12 +464,16 @@ <p>Notice the name and age values you entered are displayed in the Tomcat console shell.</p> </section> </section> - <section id="step_5"> + <section id="step_5_display"> <title>Step 5: Processing and Displaying Data</title> - <section> + <section id="create_jsp"> <title>To Create a JSP Page to Display Submitted Data</title> - <p>In the directory <code>C:/pageflow_tutorial</code> Create a file named <code>displayData.jsp</code>. Edit <code>displayData.jsp</code> so it appears as follows.</p> - <source><![CDATA[<%@ page language="java" contentType="text/html;charset=UTF-8"%> + <p>In the directory <code>C:/pageflow_tutorial</code> Create a file named + <code>displayData.jsp</code>. </p> + <p>Edit <code>displayData.jsp</code> so it appears as follows.</p> + + <p><strong><code>displayData.jsp</code></strong></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> @@ -436,17 +481,26 @@ <netui:base/> </head> <netui:body> - <p>Name:<netui:span value="${requestScope.data.name}"/> - <p>Age:<netui:span value="${requestScope.data.age}"/> + <p> + You submitted the following information: + </p> + <p> + Name:<netui:content value="${requestScope.data.name}"/><br/> + Age:<netui:content value="${requestScope.data.age}"/> + </p> </netui:body> </netui:html>]]></source> </section> - <section> + <section id="process_data"> <title>To Process the Submitted Data</title> <p>Edit the processData method in the Controller.jpf file so it appears as follows. Code to add appears in bold.</p> - <source> @Jpf.Action( + + <p><strong><code>Controller.jpf</code></strong></p> + <source> ... + + @Jpf.Action( forwards = { - @Jpf.Forward(name = "success", path = "displayData.jsp") + @Jpf.Forward(name = "success", path = "<strong>displayData.jsp</strong>") } ) public Forward processData(ProfileForm form) @@ -455,19 +509,22 @@ System.out.println("Age: " + form.getAge()); <strong>getRequest().setAttribute("data", form);</strong> return new Forward("success"); - }</source> + } + + ...</source> </section> <section> <title>To Compile and Redeploy the Page Flow</title> <p>At the command prompt, enter:</p> <source>ant - -f %BEEHIVE_HOME%\ant\buildWebapp.xml - -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial - -Dcontext.path=pageflow_tutorial - build - undeploy - deploy</source> - </section> + -f <BeehiveRoot>\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + build</source> + <p>To deploy the web application, click the following link. (Or, if you have the link below + open in a dedicated browser window, refresh that browser window.)</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> + </p></section> <section> <title>To Test the Page Flow Web Application</title> <p>Visit the following link: Modified: incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml?view=diff&rev=126328&p1=incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml&r1=126327&p2=incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml&r2=126328 ============================================================================== --- incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml (original) +++ incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml Mon Jan 24 15:45:57 2005 @@ -140,6 +140,9 @@ font-family: monospace; font-size: 11px; } + h3 { + font-size: 99%; + } </extra-css> <colors> <!-- These values are used for the generated CSS files. -->
