Author: steveh Date: Mon Nov 8 11:53:15 2004 New Revision: 56963 Modified: incubator/beehive/site/build/site/index.html incubator/beehive/site/build/site/pageflow/tutorial_pageflow.html incubator/beehive/site/build/site/wsm/tutorial_wsm.html incubator/beehive/site/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml Log: Fix for JIRA #61: Page Flow Tutorial Needs to be Updated Regarding Deploying Netui Runtime
Modified: incubator/beehive/site/build/site/index.html ============================================================================== --- incubator/beehive/site/build/site/index.html (original) +++ incubator/beehive/site/build/site/index.html Mon Nov 8 11:53:15 2004 @@ -276,20 +276,20 @@ <a href="#Get+Involved">Get Involved</a> </li> </ul> - <!-- - Beehive - Welcome<should link to the HTML page created from Welcome.doc> - License<should link to http://www.apache.org/licenses/LICENSE-2.0> - - Documentation - FAQ<should link to the HTML page created from FAQ.doc> - Controls Overview<should link to Kyle's control Overview> - Controls Programming<should link to Kyle's Controls programming pdf> - Web Services (JSR 181)<should link to http://jcp.org/en/jsr/detail?id=181> - - Contributing - Mailing Lists<should link to HTML Page created from MailingLists.doc> - Contributers<should link to HTML Page created from Contributers.doc> + <!-- + Beehive + Welcome<should link to the HTML page created from Welcome.doc> + License<should link to http://www.apache.org/licenses/LICENSE-2.0> + + Documentation + FAQ<should link to the HTML page created from FAQ.doc> + Controls Overview<should link to Kyle's control Overview> + Controls Programming<should link to Kyle's Controls programming pdf> + Web Services (JSR 181)<should link to http://jcp.org/en/jsr/detail?id=181> + + Contributing + Mailing Lists<should link to HTML Page created from MailingLists.doc> + Contributers<should link to HTML Page created from Contributers.doc> --> 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 Mon Nov 8 11:53:15 2004 @@ -292,6 +292,12 @@ <li> <a href="#To+Set+up+the+Development+Environment">To Set up the Development Environment</a> </li> +<li> +<a href="#Add+a+Manager+Role+to+Tomcat">Add a Manager Role to Tomcat</a> +</li> +<li> +<a href="#To+Start+the+Tomcat+Server">To Start the Tomcat Server</a> +</li> </ul> </li> <li> @@ -301,6 +307,9 @@ <a href="#Introduction">Introduction</a> </li> <li> +<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> </li> <li> @@ -310,17 +319,11 @@ <a href="#To+Create+a+JSP+File">To Create a JSP File</a> </li> <li> -<a href="#To+Compile+the+Page+Flow">To Compile the Page Flow</a> -</li> -<li> -<a href="#To+Start+the+Tomcat+Server">To Start the Tomcat Server</a> +<a href="#To+Compile+and+Deploy+the+Page+Flow">To Compile and Deploy the Page Flow</a> </li> <li> <a href="#To+Test+the+Page+Flow+Web+Application">To Test the Page Flow Web Application</a> </li> -<li> -<a href="#To+Shutdown+the+Tomcat+Server">To Shutdown the Tomcat Server</a> -</li> </ul> </li> <li> @@ -336,16 +339,10 @@ <a href="#To+Add+an+Action+Method+to+Handle+the+Link">To Add an Action Method to Handle the Link</a> </li> <li> -<a href="#To+Compile+the+Page+Flow-N101DE">To Compile the Page Flow</a> +<a href="#To+Compile+and+Redeploy+the+Page+Flow">To Compile and Redeploy the Page Flow</a> </li> <li> -<a href="#To+Start+the+Tomcat+Server-N101EC">To Start the Tomcat Server</a> -</li> -<li> -<a href="#To+Test+the+Page+Flow+Web+Application-N101FA">To Test the Page Flow Web Application</a> -</li> -<li> -<a href="#To+Shutdown+the+Tomcat+Server-N10211">To Shutdown the Tomcat Server</a> +<a href="#To+Test+the+Page+Flow+Web+Application-N10206">To Test the Page Flow Web Application</a> </li> </ul> </li> @@ -359,16 +356,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+the+Page+Flow-N1025A">To Compile the Page Flow</a> -</li> -<li> -<a href="#To+Start+the+Tomcat+Server-N10268">To Start the Tomcat Server</a> +<a href="#To+Compile+and+Redeploy+the+Page+Flow-N10259">To Compile and Redeploy the Page Flow</a> </li> <li> -<a href="#To+Test+the+Page+Flow+Web+Application-N10276">To Test the Page Flow Web Application</a> -</li> -<li> -<a href="#To+Shutdown+the+Tomcat+Server-N10293">To Shutdown the Tomcat Server</a> +<a href="#To+Test+the+Page+Flow+Web+Application-N10267">To Test the Page Flow Web Application</a> </li> </ul> </li> @@ -382,16 +373,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+the+Page+Flow-N102CA">To Compile the Page Flow</a> -</li> -<li> -<a href="#To+Start+the+Tomcat+Server-N102D8">To Start the Tomcat Server</a> -</li> -<li> -<a href="#To+Test+the+Page+Flow+Web+Application-N102E6">To Test the Page Flow Web Application</a> +<a href="#To+Compile+and+Redeploy+the+Page+Flow-N102AE">To Compile and Redeploy the Page Flow</a> </li> <li> -<a href="#To+Shutdown+the+Tomcat+Server-N10303">To Shutdown the Tomcat Server</a> +<a href="#To+Test+the+Page+Flow+Web+Application-N102BC">To Test the Page Flow Web Application</a> </li> </ul> </li> @@ -481,12 +466,34 @@ </p> <p>Leave the command shell open to use throughout the tutorial</p> </div> +<a name="N100BA"></a><a name="Add+a+Manager+Role+to+Tomcat"></a> +<h4>Add a Manager Role to Tomcat</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>Adding the manager role to Tomcat server allows you to run deploy related targets in the Ant file <span class="codefrag">runTomcat.xml</span>. This file is provided as a convenience for managing the Tomcat server.</p> +<p>Edit the file <span class="codefrag">CATALINA_HOME/conf/tomcat-users.xml</span> so it appears as follows:</p> +<pre class="code"><?xml version='1.0' encoding='utf-8'?> +<tomcat-users> + <role rolename="tomcat"/> + <role rolename="role1"/> + <role rolename="manager"/> + <user username="tomcat" password="tomcat" roles="tomcat"/> + <user username="role1" password="tomcat" roles="role1"/> + <user username="both" password="tomcat" roles="tomcat,role1"/> + <user username="manager" password="manager" roles="manager"/> +</tomcat-users></pre> +</div> +<a name="N100D2"></a><a name="To+Start+the+Tomcat+Server"></a> +<h4>To Start the Tomcat Server</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>At the command prompt, enter:</p> +<pre class="code">%CATALINA_HOME%\bin\startup.bat</pre> +</div> </div> -<a name="N100BB"></a><a name="step_2"></a> +<a name="N100E2"></a><a name="step_2"></a> <h3>Step 2: Create a New Page Flow Application</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N100C1"></a><a name="Introduction"></a> +<a name="N100E8"></a><a name="Introduction"></a> <h4>Introduction</h4> <div style="margin-left: 0 ; border: 2px"> <p> @@ -499,29 +506,38 @@ The Controller file you create 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> </div> -<a name="N100D5"></a><a name="To+Copy+the+Page+Flow+Application+Template"></a> +<a name="N100FC"></a><a name="Make+a+Project+Folder"></a> +<h4>Make a Project Folder</h4> +<div style="margin-left: 0 ; border: 2px"> +<p>On your C: drive, create a directory named <span class="codefrag">beehive_projects</span>.</p> +<p>In the <span class="codefrag">beehive_projects</span> directory, create a directory named <span class="codefrag">pageflow_tutorial</span> +</p> +<p>Before proceeding, confirm that the following directory structure exists:</p> +<pre class="code">C: + 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> <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. All of these resources are contained in the Page Flow application template located at<span class="codefrag">BEEHIVE_HOME/samples/netui-blank</span>.</p> -<p>In the directory <span class="codefrag">CATALINA_HOME/webapps</span>, create a directory named <span class="codefrag">pageflow_tutorial</span>.</p> -<p>Copy the folders</p> -<pre class="code">BEEHIVE_HOME/samples/netui-blank/resources</pre> -<pre class="code">BEEHIVE_HOME/samples/netui-blank/WEB-INF</pre> -<p>into</p> -<pre class="code">CATALINA_HOME/webapps/pageflow_tutorial</pre> -<p>You should *not* copy Controller.jpf, index.jsp, and error.jsp. For the sake of instruction, you will create these files by hand.</p> +<p>At the command prompt, enter the following Ant command:</p> +<pre class="code"> ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + deploy.beehive.webapp.runtime</pre> <p>Before proceeding, confirm that the following directory structure exists:</p> -<pre class="code">CATALINA_HOME - webapps - pageflow_tutorial - resources - WEB-INF</pre> +<pre class="code">C: + beehive_projects + pageflow_tutorial + resources + WEB-INF</pre> </div> -<a name="N1010B"></a><a name="To+Create+a+Controller+File"></a> +<a name="N10136"></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 the directory <span class="codefrag">CATALINA_HOME/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">Controller.jpf</span>.</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> <pre class="code">import org.apache.beehive.netui.pageflow.PageFlowController; @@ -543,10 +559,10 @@ }</pre> <p>Save and close the file Controller.jpf.</p> </div> -<a name="N1012F"></a><a name="To+Create+a+JSP+File"></a> +<a name="N1015A"></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">CATALINA_HOME/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">index.jsp</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive_projects/pageflow_tutorial</span>, create a file named <span class="codefrag">index.jsp</span>.</p> <p>Edit <span class="codefrag">index.jsp</span> so it looks like the following.</p> <pre class="code"><%@ page language="java" contentType="text/html;charset=UTF-8"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> @@ -562,47 +578,45 @@ </netui:body> </netui:html></pre> </div> -<a name="N1014A"></a><a name="To+Compile+the+Page+Flow"></a> -<h4>To Compile the Page Flow</h4> +<a name="N10175"></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.</p> +<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> -<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</pre> -<p>TODO: <span class="codefrag">This step is blocked by the following error: BUILD FAILED -C:\beehive-alpha\ant\buildWebappCore.xml:102: srcdir "C:\jakarta-tomcat-5.0.25\webapps\pageflow_tuto -rial\WEB-INF\src" does not exist!</span> -</p> -<p>WORKAROUND: create the directory CATALINA_HOME/webapps/pageflowtutorial/WEB-INF/src and recompile.</p> +<pre class="code">ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -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> +<pre class="code">ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -Dcontext.path=pageflow_tutorial + undeploy</pre> +<p>When the undeploy is complete, then compile and deploy again.</p> </div> -<a name="N10164"></a><a name="To+Start+the+Tomcat+Server"></a> -<h4>To Start the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter:</p> -<pre class="code">%CATALINA_HOME%\bin\startup.bat</pre> -</div> -<a name="N10173"></a><a name="To+Test+the+Page+Flow+Web+Application"></a> +<a name="N1019B"></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>Open a web browser and enter the following in the address bar:</p> -<pre class="code">http://localhost:8080/pageflow_tutorial</pre> +<p>Visit the following address:</p> +<p> +<a href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</a> +</p> <p>You will be directed to the <span class="codefrag">index.jsp</span> page.</p> </div> -<a name="N10188"></a><a name="To+Shutdown+the+Tomcat+Server"></a> -<h4>To Shutdown the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: - </p> -<pre class="code">%CATALINA_HOME%\bin\shutdown.bat</pre> -</div> </div> -<a name="N10198"></a><a name="step_3"></a> +<a name="N101B1"></a><a name="step_3"></a> <h3>Step 3: Navigation</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N1019E"></a><a name="To+Create+a+Destination+JSP+Page"></a> +<a name="N101B7"></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">CATALINA_HOME/webapps/pageflow_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> +<p>In the directory <span class="codefrag">C:/beehive_projects/pageflow_tutorial</span>, create a file named <span class="codefrag">page2.jsp</span>.</p> <p>Edit page2.jsp so it looks like the following.</p> <pre class="code"><%@ page language="java" contentType="text/html;charset=UTF-8"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> @@ -619,10 +633,10 @@ </netui:html></pre> <p>Save and close <span class="codefrag">page2.jsp</span>.</p> </div> -<a name="N101BC"></a><a name="To+Create+a+Link+to+the+Destination+Page"></a> +<a name="N101D5"></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">CATALINA_HOME/webapps/pageflow_tutorial/index.jsp</span>.</p> +<p>Open the file <span class="codefrag">C:/beehive_projects/pageflow_tutorial/index.jsp</span>.</p> <p>Edit <span class="codefrag">index.jsp</span> so it appears as follows.</p> <pre class="code"> <%@ page language="java" contentType="text/html;charset=UTF-8"%> @@ -643,10 +657,10 @@ </netui:html> </pre> </div> -<a name="N101D4"></a><a name="To+Add+an+Action+Method+to+Handle+the+Link"></a> +<a name="N101ED"></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">CATALINA_HOME/webapps/pageflow_tutorial/Controller.jpf</span>.</p> +<p>Open the file <span class="codefrag">C:/beehive_projects/pageflow_tutorial/Controller.jpf</span>.</p> <p>Edit <span class="codefrag">Controller.jpf</span> so it appears as follows.</p> <pre class="code">import org.apache.beehive.netui.pageflow.PageFlowController; import org.apache.beehive.netui.pageflow.Forward; @@ -677,44 +691,39 @@ } }</pre> </div> -<a name="N101EC"></a><a name="To+Compile+the+Page+Flow-N101DE"></a> -<h4>To Compile the Page Flow</h4> +<a name="N10205"></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> -<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</pre> +<pre class="code">ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -Dcontext.path=pageflow_tutorial + build.webapp + redeploy + </pre> </div> -<a name="N101FB"></a><a name="To+Start+the+Tomcat+Server-N101EC"></a> -<h4>To Start the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: </p> -<pre class="code">%CATALINA_HOME%\bin\startup.bat</pre> -</div> -<a name="N1020A"></a><a name="To+Test+the+Page+Flow+Web+Application-N101FA"></a> +<a name="N10214"></a><a name="To+Test+the+Page+Flow+Web+Application-N10206"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> -<p>Open a web browser and enter the following in the address bar: +<p>Visit the following link: </p> -<pre class="code">http://localhost:8080/pageflow_tutorial</pre> +<p> +<a href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</a> +</p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> </div> -<a name="N10222"></a><a name="To+Shutdown+the+Tomcat+Server-N10211"></a> -<h4>To Shutdown the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: - </p> -<pre class="code">%CATALINA_HOME%\bin\shutdown.bat</pre> -</div> </div> -<a name="N10232"></a><a name="step_4"></a> +<a name="N1022D"></a><a name="step_4"></a> <h3>Step 4: Submitting Data</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N10238"></a><a name="To+Create+a+Submission+Form"></a> +<a name="N10233"></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">CATALINA_HOME/webapps/pageflow_tutorial/page2.jsp</span> so it appears as follows.</p> +<p>Edit the file <span class="codefrag">C:/beehive_projects/pageflow_tutorial/page2.jsp</span> so it appears as follows.</p> <pre class="code"><%@ page language="java" contentType="text/html;charset=UTF-8"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> <netui:html> @@ -737,10 +746,10 @@ </netui:html></pre> <p>Save and close <span class="codefrag">page2.jsp</span>.</p> </div> -<a name="N10250"></a><a name="To+Edit+the+Controller+File+to+Handle+the+Submitted+Data"></a> +<a name="N1024B"></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">CATALINA_HOME/webapps/pageflow_tutorial/Controller.jpf</span> +<p>Open the file <span class="codefrag">C:/beehive_projects/pageflow_tutorial/Controller.jpf</span> </p> <p>Edit <span class="codefrag">Controller.jpf</span> so it appears as follows.</p> @@ -814,43 +823,38 @@ </pre> <p>Save and close <span class="codefrag">Controller.jpf</span>.</p> </div> -<a name="N1026E"></a><a name="To+Compile+the+Page+Flow-N1025A"></a> -<h4>To Compile the Page Flow</h4> +<a name="N10269"></a><a name="To+Compile+and+Redeploy+the+Page+Flow-N10259"></a> +<h4>To Compile and Redeploy the Page Flow</h4> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter:</p> -<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</pre> +<pre class="code">ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -Dcontext.path=pageflow_tutorial + build.webapp + redeploy + </pre> </div> -<a name="N1027D"></a><a name="To+Start+the+Tomcat+Server-N10268"></a> -<h4>To Start the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: </p> -<pre class="code">%CATALINA_HOME%\bin\startup.bat</pre> -</div> -<a name="N1028C"></a><a name="To+Test+the+Page+Flow+Web+Application-N10276"></a> +<a name="N10278"></a><a name="To+Test+the+Page+Flow+Web+Application-N10267"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> -<p>Open a web browser and enter the following in the address bar: +<p>Visit the following link: </p> -<pre class="code">http://localhost:8080/pageflow_tutorial</pre> +<p> +<a href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</a> +</p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> <p>Enter values in the Name and Age fields, and click Submit.</p> <p>Notice the name and age values you entered are displayed in the Tomcat console shell.</p> </div> -<a name="N102AA"></a><a name="To+Shutdown+the+Tomcat+Server-N10293"></a> -<h4>To Shutdown the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: - </p> -<pre class="code">%CATALINA_HOME%\bin\shutdown.bat</pre> -</div> </div> -<a name="N102BA"></a><a name="step_5"></a> +<a name="N10297"></a><a name="step_5"></a> <h3>Step 5: Processing and Displaying Data</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N102C0"></a><a name="To+Process+the+Submitted+Data"></a> +<a name="N1029D"></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> @@ -867,7 +871,7 @@ return new Forward("success"); }</pre> </div> -<a name="N102CF"></a><a name="To+Create+a+JSP+Page+to+Display+Submitted+Data"></a> +<a name="N102AC"></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> @@ -884,40 +888,35 @@ </netui:body> </netui:html></pre> </div> -<a name="N102E4"></a><a name="To+Compile+the+Page+Flow-N102CA"></a> -<h4>To Compile the Page Flow</h4> +<a name="N102C1"></a><a name="To+Compile+and+Redeploy+the+Page+Flow-N102AE"></a> +<h4>To Compile and Redeploy the Page Flow</h4> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter:</p> -<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</pre> +<pre class="code">ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -Dcontext.path=pageflow_tutorial + build.webapp + redeploy + </pre> </div> -<a name="N102F3"></a><a name="To+Start+the+Tomcat+Server-N102D8"></a> -<h4>To Start the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: </p> -<pre class="code">%CATALINA_HOME%\bin\startup.bat</pre> -</div> -<a name="N10302"></a><a name="To+Test+the+Page+Flow+Web+Application-N102E6"></a> +<a name="N102D0"></a><a name="To+Test+the+Page+Flow+Web+Application-N102BC"></a> <h4>To Test the Page Flow Web Application</h4> <div style="margin-left: 0 ; border: 2px"> -<p>Open a web browser and enter the following in the address bar: +<p>Visit the following link: </p> -<pre class="code">http://localhost:8080/pageflow_tutorial</pre> +<p> +<a href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</a> +</p> <p>You will be directed to the index.jsp page.</p> <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> </div> -<a name="N10320"></a><a name="To+Shutdown+the+Tomcat+Server-N10303"></a> -<h4>To Shutdown the Tomcat Server</h4> -<div style="margin-left: 0 ; border: 2px"> -<p>At the command prompt, enter: - </p> -<pre class="code">%CATALINA_HOME%\bin\shutdown.bat</pre> -</div> </div> -<a name="N10330"></a><a name="summary"></a> +<a name="N102EF"></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/build/site/wsm/tutorial_wsm.html ============================================================================== --- incubator/beehive/site/build/site/wsm/tutorial_wsm.html (original) +++ incubator/beehive/site/build/site/wsm/tutorial_wsm.html Mon Nov 8 11:53:15 2004 @@ -338,7 +338,7 @@ <a href="#Step+4%3A+Add+a+Non-Web+Invokable+Method">Step 4: Add a Non-Web Invokable Method</a> <ul class="minitoc"> <li> -<a href="#Compile+and+Redeploy+the+Web+Service-N101D9">Compile and Redeploy the Web Service</a> +<a href="#Compile+and+Redeploy+the+Web+Service-N101DF">Compile and Redeploy the Web Service</a> </li> <li> <a href="#To+Test+the+Non-Web+Invokable+Method">To Test the Non-Web Invokable Method</a> @@ -427,6 +427,7 @@ <h4>Add a Manager Role to Tomcat</h4> <div style="margin-left: 0 ; border: 2px"> <p>Adding the manager role to Tomcat server allows you to run deploy related targets in the Ant file <span class="codefrag">runTomcat.xml</span>. This file is provided as a convenience for managing the Tomcat server.</p> +<p>Edit the file <span class="codefrag">CATALINA_HOME/conf/tomcat-users.xml</span> so it appears as follows:</p> <pre class="code"><?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> @@ -436,10 +437,9 @@ <user username="role1" password="tomcat" roles="role1"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="manager" password="manager" roles="manager"/> -</tomcat-users> - </pre> +</tomcat-users></pre> </div> -<a name="N100BE"></a><a name="To+Start+the+Tomcat+Server"></a> +<a name="N100C4"></a><a name="To+Start+the+Tomcat+Server"></a> <h4>To Start the Tomcat Server</h4> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter:</p> @@ -447,15 +447,15 @@ </div> </div> -<a name="N100CE"></a><a name="step_2"></a> +<a name="N100D4"></a><a name="step_2"></a> <h3>Step 2: Install the Web Service Template</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N100D4"></a><a name="Introduction"></a> +<a name="N100DA"></a><a name="Introduction"></a> <h4>Introduction</h4> <div style="margin-left: 0 ; border: 2px"> <p>[todo]</p> </div> -<a name="N100DE"></a><a name="Make+a+Project+Folder"></a> +<a name="N100E4"></a><a name="Make+a+Project+Folder"></a> <h4>Make a Project Folder</h4> <div style="margin-left: 0 ; border: 2px"> <p>On your C: drive, create a directory called <span class="codefrag">beehive_projects</span>.</p> @@ -465,7 +465,7 @@ beehive_projects ws_tutorial</pre> </div> -<a name="N100F9"></a><a name="To+Copy+the+Web+Services+Application+Template"></a> +<a name="N100FF"></a><a name="To+Copy+the+Web+Services+Application+Template"></a> <h4>To Copy the Web Services Application Template</h4> <div style="margin-left: 0 ; border: 2px"> <p>[todo: what is the wsm template? What is in there?]</p> @@ -482,7 +482,7 @@ happyaxis.jsp index.html</pre> </div> -<a name="N1012A"></a><a name="Examine+the+Blank.jws+Web+Service"></a> +<a name="N10130"></a><a name="Examine+the+Blank.jws+Web+Service"></a> <h4>Examine the Blank.jws Web Service</h4> <div style="margin-left: 0 ; border: 2px"> <p>Lets examine some web service code. In a text editor of your choice, open the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span>. The file extension 'JWS' stands for Java Web Service. Beehive web services do not require the JWS extension, but it is recommended that you use JWS, especially when working in conjunction Beehive Controls and Page Flows.</p> @@ -508,14 +508,14 @@ <p> <span class="codefrag">@WebService</span> and <span class="codefrag">@WebMethod</span> are "metadata annotations", a.k.a. "annotations". Annotations allow you to set properties on Java classes and methods. They can be used to generate compile-time artifacts such as configuration files or Java classes (this is how many Beehive Control annotations work) or to determine some runtime behavior (this is how Beehive Web Service annotations work). <span class="codefrag">@WebService</span> annotates (or "decorates") the class Blank: this tells the runtime that Blank is a web service that listens for SOAP messages and responds in kind. <span class="codefrag">@WebMethod</span> annotates the method sayHelloWorld(): this tells the runtime that the method can be invoked over the web.</p> </div> -<a name="N10152"></a><a name="Copy+Runtime+JARs%2C+Compile%2C+and+Deploy+the+Web+Service"></a> +<a name="N10158"></a><a name="Copy+Runtime+JARs%2C+Compile%2C+and+Deploy+the+Web+Service"></a> <h4>Copy Runtime JARs, Compile, and Deploy the Web Service</h4> <div style="margin-left: 0 ; border: 2px"> <p>In this step you will copy the runtime jars to your web service, copile the web service, and deploy it to Tomcat, all in one step.</p> <p>Run the following Ant command:</p> <pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial deploy.wsm.webapp.runtime build.webapp deploy</pre> </div> -<a name="N10164"></a><a name="To+Run+the+Web+Service+Provided+in+the+Template"></a> +<a name="N1016A"></a><a name="To+Run+the+Web+Service+Provided+in+the+Template"></a> <h4>To Run the Web Service Provided in the Template</h4> <div style="margin-left: 0 ; border: 2px"> <p>Visit the index.jsp page: <a target="_blank" href="http://localhost:8080/ws_tutorial/index.jsp">http://localhost:8080/ws_tutorial/index.jsp</a>.</p> @@ -525,10 +525,10 @@ </div> </div> -<a name="N1017C"></a><a name="step_3"></a> +<a name="N10182"></a><a name="step_3"></a> <h3>Step 3: Add a Parameterized Method to the Web Service</h3> <div style="margin-left: 0 ; border: 2px"> -<a name="N10182"></a><a name="Edit+the+JWS+File"></a> +<a name="N10188"></a><a name="Edit+the+JWS+File"></a> <h4>Edit the JWS File</h4> <div style="margin-left: 0 ; border: 2px"> <p></p> @@ -561,14 +561,14 @@ }</pre> <p>The <span class="codefrag">@WebParam</span> you just added lets you pass a String parameter to the method over the web. The <span class="codefrag">name="greetee"</span> attribute is optional. If you do not explicitly specify a <span class="codefrag">name</span> attribute, the parameter will take the default name <span class="codefrag">str0</span> [<--- todo: verify].</p> </div> -<a name="N101A5"></a><a name="Compile+and+Redeploy+the+Web+Service"></a> +<a name="N101AB"></a><a name="Compile+and+Redeploy+the+Web+Service"></a> <h4>Compile and Redeploy the Web Service</h4> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter the following Ant command:</p> <pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial build.webapp redeploy</pre> <p>This Ant command compiles the app, undeploys it, and then deploys it. Calling <span class="codefrag">ant ... redeploy</span> is equivalent to calling <span class="codefrag">ant ... undeploy deploy</span>.</p> </div> -<a name="N101BD"></a><a name="Test+the+Parameterized+Method"></a> +<a name="N101C3"></a><a name="Test+the+Parameterized+Method"></a> <h4>Test the Parameterized Method</h4> <div style="margin-left: 0 ; border: 2px"> <p>Enter the following URL in the address bar of your browser. </p> @@ -585,7 +585,7 @@ </div> </div> -<a name="N101D3"></a><a name="Step+4%3A+Add+a+Non-Web+Invokable+Method"></a> +<a name="N101D9"></a><a name="Step+4%3A+Add+a+Non-Web+Invokable+Method"></a> <h3>Step 4: Add a Non-Web Invokable Method</h3> <div style="margin-left: 0 ; border: 2px"> <p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows.</p> @@ -622,14 +622,14 @@ } </pre> <p>Note that the method added, sayNothingOverTheWeb(), does not have the annotation @WebMethod, indicating that it cannot be invoked by SOAP messages over the web.</p> -<a name="N101E7"></a><a name="Compile+and+Redeploy+the+Web+Service-N101D9"></a> +<a name="N101ED"></a><a name="Compile+and+Redeploy+the+Web+Service-N101DF"></a> <h4>Compile and Redeploy the Web Service</h4> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter the following Ant command:</p> <pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial build.webapp redeploy</pre> <p>This Ant command compiles the app, undeploys it, and then deploys it. Calling <span class="codefrag">ant ... redeploy</span> is equivalent to calling <span class="codefrag">ant ... undeploy deploy</span>.</p> </div> -<a name="N101FF"></a><a name="To+Test+the+Non-Web+Invokable+Method"></a> +<a name="N10205"></a><a name="To+Test+the+Non-Web+Invokable+Method"></a> <h4>To Test the Non-Web Invokable Method</h4> <div style="margin-left: 0 ; border: 2px"> <p>Enter the following URL in the address bar of your browser. </p> @@ -647,7 +647,7 @@ </soapenv:Body> </soapenv:Envelope> </pre> </div> -<a name="N10214"></a><a name="Step+5%3A+Change+the+SOAP+Style"></a> +<a name="N1021A"></a><a name="Step+5%3A+Change+the+SOAP+Style"></a> <h4>Step 5: Change the SOAP Style</h4> <div style="margin-left: 0 ; border: 2px"> <p>The default SOAP style for JSR-181 web services is DOC-literal. In this step you will change the style to RPC-encoded.</p> @@ -685,13 +685,13 @@ return "Not for for Web consumption!"; } }</pre> -<a name="N10228"></a><a name="Compile+and+Redeploy+the+Web+Service-N10217"></a> +<a name="N1022E"></a><a name="Compile+and+Redeploy+the+Web+Service-N1021D"></a> <h5>Compile and Redeploy the Web Service</h5> <div style="margin-left: 0 ; border: 2px"> <p>At the command prompt, enter the following Ant command:</p> <pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial build.webapp redeploy</pre> </div> -<a name="N10237"></a><a name="To+Test+the+Non-Web+Invokable+Method-N10225"></a> +<a name="N1023D"></a><a name="To+Test+the+Non-Web+Invokable+Method-N1022B"></a> <h5>To Test the Non-Web Invokable Method</h5> <div style="margin-left: 0 ; border: 2px"> <p>Enter the following URL in the address bar of your browser. </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 Mon Nov 8 11:53:15 2004 @@ -68,6 +68,26 @@ </p> <p>Leave the command shell open to use throughout the 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:</p> + <source><![CDATA[<?xml version='1.0' encoding='utf-8'?> +<tomcat-users> + <role rolename="tomcat"/> + <role rolename="role1"/> + <role rolename="manager"/> + <user username="tomcat" password="tomcat" roles="tomcat"/> + <user username="role1" password="tomcat" roles="role1"/> + <user username="both" password="tomcat" roles="tomcat,role1"/> + <user username="manager" password="manager" roles="manager"/> +</tomcat-users>]]></source> + </section> + <section> + <title>To Start the Tomcat Server</title> + <p>At the command prompt, enter:</p> + <source>%CATALINA_HOME%\bin\startup.bat</source> + </section> </section> <section id="step_2"> <title>Step 2: Create a New Page Flow Application</title> @@ -84,26 +104,33 @@ </p> </section> <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> + <source>C: + beehive_projects + 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. All of these resources are contained in the Page Flow application template located at<code>BEEHIVE_HOME/samples/netui-blank</code>.</p> - <p>In the directory <code>CATALINA_HOME/webapps</code>, create a directory named <code>pageflow_tutorial</code>.</p> - <p>Copy the folders</p> - <source>BEEHIVE_HOME/samples/netui-blank/resources</source> - <source>BEEHIVE_HOME/samples/netui-blank/WEB-INF</source> - <p>into</p> - <source>CATALINA_HOME/webapps/pageflow_tutorial</source> - <p>You should *not* copy Controller.jpf, index.jsp, and error.jsp. For the sake of instruction, you will create these files by hand.</p> + <p>At the command prompt, enter the following Ant command:</p> + <source> ant + -f %BEEHIVE_HOME%\ant\buildWebapp.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>CATALINA_HOME - webapps - pageflow_tutorial - resources - WEB-INF</source> +<source>C: + beehive_projects + pageflow_tutorial + resources + WEB-INF</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 the directory <code>CATALINA_HOME/webapps/pageflow_tutorial</code>, create a file named <code>Controller.jpf</code>.</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; @@ -127,7 +154,7 @@ </section> <section> <title>To Create a JSP File</title> - <p>In the directory <code>CATALINA_HOME/webapps/pageflow_tutorial</code>, create a file named <code>index.jsp</code>.</p> + <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"%> @@ -144,38 +171,37 @@ </netui:html>]]></source> </section> <section> - <title>To Compile the Page Flow</title> - <p>You are now ready to compile the Page Flow.</p> + <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 build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</source> - <p>TODO: <code>This step is blocked by the following error: BUILD FAILED -C:\beehive-alpha\ant\buildWebappCore.xml:102: srcdir "C:\jakarta-tomcat-5.0.25\webapps\pageflow_tuto -rial\WEB-INF\src" does not exist!</code></p> - <p>WORKAROUND: create the directory CATALINA_HOME/webapps/pageflowtutorial/WEB-INF/src and recompile.</p> - </section> - <section> - <title>To Start the Tomcat Server</title> - <p>At the command prompt, enter:</p> - <source>%CATALINA_HOME%\bin\startup.bat</source> +<source>ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -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> +<source>ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -Dcontext.path=pageflow_tutorial + undeploy</source> + <p>When the undeploy is complete, then compile and deploy again.</p> </section> <section> <title>To Test the Page Flow Web Application</title> - <p>Open a web browser and enter the following in the address bar:</p> - <source>http://localhost:8080/pageflow_tutorial</source> + <p>Visit the following address:</p> + <p><link href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</link></p> <p>You will be directed to the <code>index.jsp</code> page.</p> </section> - <section> - <title>To Shutdown the Tomcat Server</title> - <p>At the command prompt, enter: - </p> - <source>%CATALINA_HOME%\bin\shutdown.bat</source> - </section> </section> <section id="step_3"> <title>Step 3: Navigation</title> <section> <title>To Create a Destination JSP Page</title> - <p>In the directory <code>CATALINA_HOME/webapps/pageflow_tutorial</code>, create a file named <code>page2.jsp</code>.</p> + <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> <source><![CDATA[<%@ page language="java" contentType="text/html;charset=UTF-8"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> @@ -194,7 +220,7 @@ </section> <section> <title>To Create a Link to the Destination Page</title> - <p>Open the file <code>CATALINA_HOME/webapps/pageflow_tutorial/index.jsp</code>.</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.</p> <source><![CDATA[ <%@ page language="java" contentType="text/html;charset=UTF-8"%> @@ -217,7 +243,7 @@ </section> <section> <title>To Add an Action Method to Handle the Link</title> - <p>Open the file <code>CATALINA_HOME/webapps/pageflow_tutorial/Controller.jpf</code>.</p> + <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><![CDATA[import org.apache.beehive.netui.pageflow.PageFlowController; import org.apache.beehive.netui.pageflow.Forward; @@ -249,36 +275,31 @@ }]]></source> </section> <section> - <title>To Compile the Page Flow</title> + <title>To Compile and Redeploy the Page Flow</title> <p>At the command prompt, enter:</p> - <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</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>ant + -f %BEEHIVE_HOME%\ant\buildWebapp.xml + -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial + -Dcontext.path=pageflow_tutorial + build.webapp + redeploy + </source> </section> <section> <title>To Test the Page Flow Web Application</title> - <p>Open a web browser and enter the following in the address bar: + <p>Visit the following link: </p> - <source>http://localhost:8080/pageflow_tutorial</source> + <p><link href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</link></p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> </section> - <section> - <title>To Shutdown the Tomcat Server</title> - <p>At the command prompt, enter: - </p> - <source>%CATALINA_HOME%\bin\shutdown.bat</source> - </section> </section> <section id="step_4"> <title>Step 4: Submitting Data</title> <section> <title>To Create a Submission Form</title> - <p>Edit the file <code>CATALINA_HOME/webapps/pageflow_tutorial/page2.jsp</code> so it appears as follows.</p> + <p>Edit the file <code>C:/beehive_projects/pageflow_tutorial/page2.jsp</code> 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> @@ -303,7 +324,7 @@ </section> <section> <title>To Edit the Controller File to Handle the Submitted Data</title> - <p>Open the file <code>CATALINA_HOME/webapps/pageflow_tutorial/Controller.jpf</code> + <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><![CDATA[ @@ -376,33 +397,28 @@ ]]></source> <p>Save and close <code>Controller.jpf</code>.</p> </section> - <section> - <title>To Compile the Page Flow</title> - <p>At the command prompt, enter:</p> - <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</source> - </section> <section> - <title>To Start the Tomcat Server</title> - <p>At the command prompt, enter: </p> - <source>%CATALINA_HOME%\bin\startup.bat</source> + <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.webapp + redeploy + </source> </section> <section> <title>To Test the Page Flow Web Application</title> - <p>Open a web browser and enter the following in the address bar: + <p>Visit the following link: </p> - <source>http://localhost:8080/pageflow_tutorial</source> + <p><link href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</link></p> <p>You will be directed to the index.jsp page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> <p>Enter values in the Name and Age fields, and click Submit.</p> <p>Notice the name and age values you entered are displayed in the Tomcat console shell.</p> </section> - <section> - <title>To Shutdown the Tomcat Server</title> - <p>At the command prompt, enter: - </p> - <source>%CATALINA_HOME%\bin\shutdown.bat</source> - </section> </section> <section id="step_5"> <title>Step 5: Processing and Displaying Data</title> @@ -438,32 +454,27 @@ </netui:body> </netui:html>]]></source> </section> - <section> - <title>To Compile the Page Flow</title> - <p>At the command prompt, enter:</p> - <source>ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml build.webapp -Dwebapp.dir=%CATALINA_HOME%\webapps\pageflow_tutorial</source> - </section> <section> - <title>To Start the Tomcat Server</title> - <p>At the command prompt, enter: </p> - <source>%CATALINA_HOME%\bin\startup.bat</source> + <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.webapp + redeploy + </source> </section> <section> <title>To Test the Page Flow Web Application</title> - <p>Open a web browser and enter the following in the address bar: + <p>Visit the following link: </p> - <source>http://localhost:8080/pageflow_tutorial</source> + <p><link href="http://localhost:8080/pageflow_tutorial">http://localhost:8080/pageflow_tutorial</link></p> <p>You will be directed to the index.jsp page.</p> <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> - </section> - <section> - <title>To Shutdown the Tomcat Server</title> - <p>At the command prompt, enter: - </p> - <source>%CATALINA_HOME%\bin\shutdown.bat</source> </section> </section> <section id="summary"> Modified: incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml ============================================================================== --- incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml (original) +++ incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml Mon Nov 8 11:53:15 2004 @@ -67,6 +67,7 @@ <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:</p> <source><![CDATA[<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> @@ -76,8 +77,7 @@ <user username="role1" password="tomcat" roles="role1"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="manager" password="manager" roles="manager"/> -</tomcat-users> - ]]></source> +</tomcat-users>]]></source> </section> <section> <title>To Start the Tomcat Server</title>
