You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/05/18 07:02:27 UTC
svn commit: r170707 -
/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
Author: rich
Date: Tue May 17 22:02:26 2005
New Revision: 170707
URL: http://svn.apache.org/viewcvs?rev=170707&view=rev
Log:
This is an update to the Page Flow tutorial docs. There's no JIRA bug, because JIRA is down...
tests: validate in docs/forrest (WinXP)
BB: self (linux)
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
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?rev=170707&r1=170706&r2=170707&view=diff
==============================================================================
--- 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 Tue May 17 22:02:26 2005
@@ -54,7 +54,6 @@
resources
WEB-INF
Controller.java
- error.jsp
index.jsp</source>
</section>
@@ -108,10 +107,13 @@
file determine 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.java
- 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>
+ In terms of the Model-View-Controller paradigm for web applications, the Controller.java
+ file is the Controller (naturally) and the JSP pages are the View. The web application's
+ Model in this tutorial 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
@@ -121,7 +123,7 @@
<!--[tbd: diagram, etc.]-->
</p>
<p>
- The Controller file you create in this step contains one simple Action method. This
+ The Controller file 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>
@@ -141,7 +143,7 @@
class is destroyed.</p>
<p>After the <code>onCreate()</code> method is run, the Page Flow runtime
searches for (and runs) a method or action named <code>begin</code>.
- In this case, there is an action named <code>begin</code>:
+ In this Controller file, there is a simple action named <code>begin</code>:
</p>
<source>@Jpf.SimpleAction(name="begin", path="index.jsp")</source>
<p>The begin action <em>could</em> have been expressed using method syntax: </p>
@@ -154,9 +156,10 @@
{
return new Forward("success");
}</source>
-<p>But we have used the action syntax for the sake of syntactical simplicty.</p>
+ <p>We have used the Simple Action syntax for the sake of syntactical simplicity.
+ The Simple Action will forward the user to the JSP, index.jsp.</p>
<p>The Controller class is instantiated when a user calls it via the URL:</p>
- <source>http://localhost:8080/tutorial_pageflow/Controller.jpf</source>
+ <source>http://localhost:8080/pageflow_tutorial/Controller.jpf</source>
<p><strong><code>Controller.java</code></strong></p>
<source>import javax.servlet.http.HttpSession;
@@ -261,10 +264,12 @@
</section>
<section id="create_link">
<title>To Create a Link to the Destination Page</title>
+ <p>In this step you will create a link from the JSP, <code>index.jsp</code> to a new Simple Action
+ that you will add to the Controller file.</p>
<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>
- <p><strong><code>index.jsp</code></strong></p>
- <source><%@ page language="java" contentType="text/html;charset=UTF-8"%>
+ <p>Edit <code>index.jsp</code> so it appears as follows. The code to add appears in bold type.</p>
+ <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"%>
@@ -315,7 +320,7 @@
</section>
<section id="compile_3">
<title>To Recompile and Redeploy the Page Flow</title>
- <p>Compile and deploy the Page Flow using the same Ant commands used in <a href="#compile_2">step 2</a>.</p>
+ <p>Compile and deploy the Page Flow using the same Ant and copy commands used in <a href="#compile_2">step 2</a>.</p>
<p>If you are asked to overwrite the old WAR file, enter 'Yes'.</p>
<p>Wait a few seconds for Tomcat to redeploy the WAR file, then move on to the next step.</p>
</section>
@@ -334,6 +339,8 @@
<title>Step 4: Submitting Data</title>
<section id="create_form">
<title>To Create a Submission Form</title>
+ <p>This step illustrates the use of custom tags to render an HTML form tag and link it to an Action.
+ In a later step, the new Action will be added to the Controller file to handle the data submission.</p>
<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"%>
@@ -397,6 +404,8 @@
</section>
<section id="edit_4">
<title>To Edit the Controller File to Handle the Submitted Data</title>
+ <p>Now you will add a new Action and use your new Form Bean to handle the data
+ submitted from the HTML form.</p>
<p>Open the file <code>C:/beehive_projects/pageflow_tutorial/Controller.java</code>
</p>
<p>Edit <code>Controller.java</code> so it appears as follows. Code to add appears in bold type.</p>
@@ -455,7 +464,7 @@
</section>
<section id="compile_redeploy">
<title>To Recompile and Redeploy the Page Flow</title>
- <p>Compile and deploy the Page Flow using the same Ant commands used in <a href="#compile_2">step 2</a>.</p>
+ <p>Compile and deploy the Page Flow using the same Ant and copy commands used in <a href="#compile_2">step 2</a>.</p>
<p>If you are asked to overwrite the old WAR file, enter 'Yes'.</p>
<p>Wait a few seconds for Tomcat to redeploy the WAR file, then move on to the next step.</p>
</section>
@@ -475,7 +484,8 @@
<title>Step 5: Processing and Displaying Data</title>
<section id="create_jsp">
<title>To Create a JSP Page to Display Submitted Data</title>
- <p>In the directory <code>C:/beehive-projects/pageflow_tutorial</code> create a file named
+ <p>In this step you will create a new JSP to present the results from processing the data submission.</p>
+ <p>In the directory <code>C:/beehive_projects/pageflow_tutorial</code> create a file named
<strong><code>displayData.jsp</code></strong>. </p>
<p>Edit <code>displayData.jsp</code> so it appears as follows.</p>
@@ -526,7 +536,7 @@
<section id="compile_5">
<title>To Recompile and Redeploy the Page Flow</title>
- <p>Compile and deploy the Page Flow using the same Ant commands used in <a href="#compile_2">step 2</a>.</p>
+ <p>Compile and deploy the Page Flow using the same Ant and copy commands used in <a href="#compile_2">step 2</a>.</p>
<p>If you are asked to overwrite the old WAR file, enter 'Yes'.</p>
<p>Wait a few seconds for Tomcat to redeploy the WAR file, then move on to the next step.</p>
</section>