Author: ochikvina
Date: 2009-04-03 05:27:02 -0400 (Fri, 03 Apr 2009)
New Revision: 14486
Modified:
trunk/struts/docs/struts_tools_tutorial/en/modules/coding_files.xml
trunk/struts/docs/struts_tools_tutorial/en/modules/generating_stub.xml
trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-671 - updating the chapters;
Modified: trunk/struts/docs/struts_tools_tutorial/en/modules/coding_files.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/modules/coding_files.xml 2009-04-03
09:26:34 UTC (rev 14485)
+++ trunk/struts/docs/struts_tools_tutorial/en/modules/coding_files.xml 2009-04-03
09:27:02 UTC (rev 14486)
@@ -34,7 +34,7 @@
<listitem>
<para>You are looking at a Java stub class that was
generated by JBoss
- Developer Studio. Now we are going to edit the
file</para>
+ Tools. Now we are going to edit the file</para>
</listitem>
<listitem>
@@ -42,7 +42,6 @@
</listitem>
</itemizedlist>
<programlisting role="JAVA"><![CDATA[private String
name = "";
- private String greetName = "";
]]></programlisting>
<itemizedlist>
@@ -52,7 +51,6 @@
</listitem>
</itemizedlist>
<programlisting role="JAVA"><![CDATA[this.name =
"";
- this.greetName = "";
]]></programlisting>
<itemizedlist>
@@ -68,17 +66,19 @@
<itemizedlist>
<listitem>
<para>Right-click and select <emphasis>
- <property>Source > Generate Getters and
Setters...</property>
+ <property>Source > Generate Getters and
Setters</property>
</emphasis>from the context menu</para>
</listitem>
<listitem>
- <para>In the dialog box, check the check boxes for name and
greetName,
+ <para>In the dialog box, check the check box for
<emphasis>
+ <property>name</property>,</emphasis>
select First method for Insertion point, and click on the
<emphasis>
<property>OK</property>
</emphasis> button</para>
</listitem>
</itemizedlist>
- <para>The final GetNameForm.java file should look like
this:</para>
+ <para>The final <emphasis>
+ <property>GetNameForm.java</property></emphasis>
file should look like this:</para>
<programlisting role="JAVA"><![CDATA[package sample;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
@@ -88,7 +88,6 @@
{
private String name = "";
- private String greetName = "";
public String getName()
{
@@ -99,16 +98,6 @@
this.name = name;
}
- public String getGreetName()
- {
- return greetName;
- }
-
- public void setGreetName(String greetName)
- {
- this.greetName = greetName;
- }
-
public GetNameForm()
{
}
@@ -116,7 +105,6 @@
public void reset(ActionMapping actionMapping, HttpServletRequest request)
{
this.name = "";
- this.greetName = "";
}
public ActionErrors validate(ActionMapping actionMapping,
@@ -138,7 +126,8 @@
<title>GreetingAction.java</title>
<itemizedlist>
<listitem>
- <para>Open GreetingAction.java for editing</para>
+ <para>Open <emphasis>
+
<property>GreetingAction.java</property></emphasis> for
editing</para>
</listitem>
<listitem>
<para>Inside the execute method, delete the TO DO lines and
add the
@@ -152,7 +141,8 @@
return mapping.findForward(FORWARD_sayHello);
]]></programlisting>
- <para>The final version of GreetingAction.java should look like
this:</para>
+ <para>The final version of <emphasis>
+ <property>GreetingAction.java</property></emphasis>
should look like this:</para>
<programlisting role="JAVA"><![CDATA[package sample;
import javax.servlet.http.HttpServletRequest;
@@ -267,7 +257,7 @@
</emphasis></para>
</listitem>
<listitem>
- <para>In the StrutsForm library in the JBoss Tools Palette,
select <emphasis>
+ <para>In the StrutsForm library in the
<property>JBoss Tools Palette</property>, select <emphasis>
<property>submit</property>
</emphasis>, and drag it to right after the text box in
the Visual pane
of the editor</para>
@@ -322,19 +312,21 @@
</html>
]]></programlisting>
- <para>To complete editing of this file, we will use macros from the
JBoss Tools
- Palette. This palette is a view that should be available to the right
of the
+ <para>To complete editing of this file, we will use macros from the
<property>JBoss Tools
+ Palette</property>. This palette is a view that should be
available to the right of the
editing area.</para>
<itemizedlist>
<listitem>
<para>Click on the <emphasis>
<property>Struts Common</property>
- </emphasis> folder in the JBoss Tools Palette to open
it</para>
+ </emphasis> folder in the <property>JBoss Tools
Palette</property> to open it</para>
</listitem>
<listitem>
- <para>Position the cursor at the beginning of the
greeting.jsp file in the
- Source pane and then click on bean taglib in the JBoss Tools
- Palette</para>
+ <para>Position the cursor at the beginning of the
<emphasis>
+
<property>greeting.jsp</property></emphasis> file in the
+ Source pane and then click on <emphasis>
+ <property>bean
taglib</property></emphasis> in the <property>JBoss Tools
+ Palette</property></para>
</listitem>
</itemizedlist>
<para>This will insert the following line at the top of the
file:</para>
@@ -345,7 +337,7 @@
<listitem>
<para>Click on the <emphasis>
<property>Struts Bean</property>
- </emphasis> folder in the JBoss Tools Palette to open
it</para>
+ </emphasis> folder in the <property>JBoss Tools
Palette</property> to open it</para>
</listitem>
<listitem>
<para>Position the cursor inside the <emphasis
role="bold">
@@ -353,15 +345,16 @@
</emphasis> element</para>
</listitem>
<listitem>
- <para>Click on write in the JBoss Tools
Palette</para>
+ <para>Click on <emphasis>
+ <property>write</property></emphasis> in
the <property>JBoss Tools Palette</property></para>
</listitem>
<listitem>
<para>Type in "GetNameForm" for the
<emphasis
role="italic">
-
<property>"name"</property>
+ <property>name</property>
</emphasis> attribute and add a <emphasis
role="italic">
-
<property>"property"</property>
- </emphasis> attribute with
"greetName" as its
+ <property>property</property>
+ </emphasis> attribute with "name" as
its
value</para>
</listitem>
</itemizedlist>
@@ -378,28 +371,31 @@
</section>
<section id="index.jsp">
<title>index.jsp</title>
- <para>Finally, we will need to create and edit an index.jsp page.
This page will use
+ <para>Finally, we will need to create and edit an <emphasis>
+ <property>index.jsp</property></emphasis> page.
This page will use
a Struts forward to simply redirect us to the getName global
forward.</para>
<itemizedlist>
<listitem>
<para>In the Web Projects view, right-click on
<emphasis>
<property>StrutsHello >
WEB-ROOT(WebContent)</property>
</emphasis> node and select <emphasis>
- <property>New > File >
JSP..</property>
+ <property>New > File > JSP</property>
</emphasis></para>
</listitem>
<listitem>
- <para>Type index for Name and click on the
<emphasis>
+ <para>Type <emphasis>
+ <property>index</property></emphasis> for
Name and click on the <emphasis>
<property>Finish</property>
</emphasis> button</para>
</listitem>
<listitem>
- <para>On the JBoss Tools Palette, select the
<emphasis>
+ <para>On the <property>JBoss Tools
Palette</property>, select the <emphasis>
<property>Struts Common</property>
</emphasis> folder of macros by clicking on it in the
palette</para>
</listitem>
<listitem>
- <para>Click on the logic taglib icon</para>
+ <para>Click on the <emphasis>
+ <property>logic
taglib</property></emphasis> icon</para>
</listitem>
<listitem>
<para>Press the <emphasis>
@@ -412,7 +408,8 @@
</emphasis> folder of macros</para>
</listitem>
<listitem>
- <para>Click on redirect</para>
+ <para>Click on <emphasis>
+
<property>redirect</property></emphasis></para>
</listitem>
<listitem>
<para>Delete the ending tag, put a forward slash in front
of the closing
Modified: trunk/struts/docs/struts_tools_tutorial/en/modules/generating_stub.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/modules/generating_stub.xml 2009-04-03
09:26:34 UTC (rev 14485)
+++ trunk/struts/docs/struts_tools_tutorial/en/modules/generating_stub.xml 2009-04-03
09:27:02 UTC (rev 14486)
@@ -45,7 +45,7 @@
</itemizedlist>
<para>The Java files will be generated in a <emphasis>
<property>JavaSource > sample</property>
- </emphasis> folder that you can see in the Package Explorer view under the
+ </emphasis> folder that you can see in the <property>Package Explorer
view</property> under the
"StrutsHello" node. One Action stub and one FormBean stub
will have
been generated.</para>
</chapter>
\ No newline at end of file
Modified: trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml 2009-04-03
09:26:34 UTC (rev 14485)
+++ trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml 2009-04-03
09:27:02 UTC (rev 14486)
@@ -11,7 +11,7 @@
<title>Creating a Simple Struts Application</title>
- <para>Firstly, we assume that you have already launched Eclipse with JBoss
Tools installed and
+ <para>Firstly, we assume that you have already launched Eclipse with
<property>JBoss Tools</property> installed and
also that the <property>Web Development perspective</property> is the
current perspective. (If not, make it
active by selecting <emphasis>
<property>Window > Open Perspective > Other > Web
@@ -24,31 +24,27 @@
<itemizedlist>
<listitem>
<para>Go to the menu bar and select <emphasis>
- <property>File > New >
Project...</property>
- </emphasis>.</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property>JBoss Tools Web > Struts > Struts
Project</property>
- </emphasis> in the New Project dialog box</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property>Next </property>
+ <property>File > New > Struts
Project</property>
</emphasis></para>
</listitem>
<listitem>
- <para>Enter "StrutsHello" as the project
name</para>
+ <para>Next enter "StrutsHello" as the project
name</para>
</listitem>
<listitem>
- <para>Leave everything else as is, and click <emphasis>
+ <para>Leave everything else as it is, and click <emphasis>
<property>Next</property>
</emphasis></para>
</listitem>
<listitem>
+ <para>If you have server runtime already defined, just pass to next
point. Otherwise in the <emphasis>
+ <property>Runtime</property></emphasis> section
click the <emphasis>
+ <property>New</property></emphasis> button and
target at needed server runtime environment. Click <emphasis>
+
<property>Finish</property>.</emphasis></para>
+ </listitem>
+ <listitem>
<para>Click <emphasis>
<property>Next</property>
- </emphasis> again</para>
+ </emphasis></para>
</listitem>
<listitem>
<para>Make sure that <emphasis>
@@ -57,13 +53,13 @@
<property>struts-html.tld</property>
</emphasis>, and <emphasis>
<property>struts-logic.tld</property>
- </emphasis> are checked in the list of included tag libraries and
then click <emphasis>
+ </emphasis> are checked in the list of included tag libraries and
then hit <emphasis>
<property>Finish</property>
</emphasis></para>
</listitem>
</itemizedlist>
- <para>A "StrutsHello" node should appear in the
upper-left Package
- Explorer view.</para>
+ <para>A "StrutsHello" node should appear in the
<property>Package
+ Explorer view</property>.</para>
<itemizedlist>
<listitem>
<para>Click the plus sign next to <emphasis>
@@ -73,12 +69,14 @@
<listitem>
<para>Click the plus sign next to <emphasis>
<property>WebContent</property>
- </emphasis> under StrutsHello</para>
+ </emphasis> under <emphasis>
+
<property>StrutsHello</property></emphasis></para>
</listitem>
<listitem>
<para>Click the plus sign next to <emphasis>
<property>WEB-INF</property>
- </emphasis> under WebContent</para>
+ </emphasis> under <emphasis>
+
<property>WebContent</property></emphasis></para>
</listitem>
<listitem>
<para>Then, double-click on the <emphasis>
@@ -105,7 +103,7 @@
<title>Creating the Page Placeholders</title>
<itemizedlist>
<listitem>
- <para>Bring the Web Projects view to the front of the
Package Explorer view
+ <para>Bring the <property>Web Projects
view</property> to the front of the <property>Package Explorer
view</property>
by selecting the <emphasis>
<property>Web Projects</property>
</emphasis> tab next to that tab.</para>
@@ -113,7 +111,7 @@
<listitem>
<para>Right-click the <emphasis>
<property>StrutsHello > WEB-ROOT
(WebContent)</property>
- </emphasis> folder in the Web Projects view and select
<emphasis>
+ </emphasis> folder in the <property>Web Projects
view</property> and select <emphasis>
<property>New > Folder...</property>
</emphasis></para>
</listitem>
@@ -130,7 +128,8 @@
</listitem>
<listitem>
- <para>Right-click the pages folder and select
<emphasis>
+ <para>Right-click the <emphasis>
+ <property>pages</property></emphasis>
folder and select <emphasis>
<property>New > File >
JSP...</property>
</emphasis>
</para>
@@ -146,14 +145,16 @@
</emphasis> button</para>
</listitem>
<listitem>
- <para>Right-click the pages folder again and select
<emphasis>
+ <para>Right-click the <emphasis>
+ <property>pages</property></emphasis>
folder again and select <emphasis>
<property>New > File >
JSP...</property>
</emphasis></para>
</listitem>
<listitem>
<para>For Name type in <emphasis>
<property>greeting</property>
- </emphasis>, for Template leave as Blank, and then
click on the <emphasis>
+ </emphasis>, for Template leave as <emphasis>
+ <property>Blank</property>,</emphasis> and
then click on the <emphasis>
<property>Finish</property>
</emphasis> button</para>
</listitem>
@@ -167,18 +168,18 @@
<listitem>
<para>Click on the <emphasis>
<property>struts-config.xml</property>
- </emphasis> tab in the Editing area to bring the
diagram to the
+ </emphasis> tab in the editing area to bring the
diagram to the
front</para>
</listitem>
<listitem>
<para>Click on the <emphasis>
<property>inputname.jsp</property>
- </emphasis> page in the Web Projects view, drag it onto
the diagram, and
+ </emphasis> page in the <property>Web Projects
view</property>, drag it onto the diagram, and
drop it</para>
</listitem>
<listitem><para>Click on the <emphasis>
<property>greeting.jsp</property>
- </emphasis> page in the Web Projects view, drag it onto the
diagram, and
+ </emphasis> page in the <property>Web Projects
view</property>, drag it onto the diagram, and
drop it to the right of the <emphasis>
<property>/pages/inputname.jsp</property>
</emphasis> icon with some extra
space</para></listitem>
@@ -193,7 +194,7 @@
<itemizedlist>
<listitem>
<para>Right-click between the two icons and select
<emphasis>
- <property>Add > Action</property>
+ <property>New > Action</property>
</emphasis></para>
</listitem>
<listitem>
@@ -240,14 +241,18 @@
<para>The <emphasis>
<property>/greeting</property>
</emphasis> action should appear in four places, in the diagram,
under the
- action-mappings node, under the struts-config.xml node in Tree view, in
Web Projects
- view and in the Outline view. Also, note the asterisk to the right of the
name,
- struts-config.xml, in the Outline view showing that the file has been
changed, but
+ <emphasis>
+ <property>action-mappings</property></emphasis>
node, under the <emphasis>
+
<property>struts-config.xml</property></emphasis> node in Tree view, in
<property>Web Projects
+ view</property> and in the <property>Outline
view</property>. Also, note the asterisk to the right of the name,
+ <emphasis>
+ <property>struts-config.xml</property>,</emphasis>
in the <property>Outline view</property> showing that the file has been
changed, but
not saved to disk.</para>
</section>
<section id="CreatingaLink">
<title>Creating a Link</title>
- <para>Let's now create a link from the inputname.jsp page to
the action.</para>
+ <para>Let's now create a link from the <emphasis>
+ <property>inputname.jsp</property></emphasis> page to
the action.</para>
<itemizedlist>
<listitem>
<para>On the left-hand side of the diagram in the column of
icons, click on this
@@ -300,7 +305,8 @@
</listitem>
<listitem>
<para>That's it. A link will be drawn from the actions
new greeting
- forward to the greeting.jsp JSP page. Note that the forwards name
will be
+ forward to the <emphasis>
+
<property>greeting.jsp</property></emphasis> JSP page. Note that the
forwards name will be
set based on the name of the target JSP file name. If you
don't
like it, you can easily change it</para>
</listitem>
@@ -312,12 +318,13 @@
</listitem>
<listitem>
<para>Expand the <emphasis>
-
<property>struts-config.xml/action-mappings//greeting</property>
+ <property>struts-config.xml/action-mappings/
/greeting</property>
</emphasis> node and then select the greeting
forward</para>
</listitem>
<listitem>
<para>In the Properties Editor to the right, change the text
to
- "sayHello" in the Name field</para>
+ "sayHello" in the <emphasis>
+ <property>Name</property></emphasis>
field</para>
</listitem>
<listitem>
<para>Select the <emphasis>
@@ -333,13 +340,14 @@
<itemizedlist>
<listitem>
<para>Somewhere in the top-left corner of diagram, right-click
and select <emphasis>
- <property> Add > Global Forward...</property>
+ <property>New > Global Forward</property>
</emphasis></para>
</listitem>
<listitem>
<para>Enter <emphasis>
<property>getName</property>
- </emphasis> in the Name field</para>
+ </emphasis> in the <emphasis>
+ <property>Name</property></emphasis>
field</para>
</listitem>
<listitem>
<para>Select the <emphasis>
@@ -389,7 +397,8 @@
<para>One last thing that we need to do is to create a form
bean.</para>
<itemizedlist>
<listitem>
- <para>Switch to the Tree viewer in the editor for the
struts-config.xml file, by
+ <para>Switch to the Tree viewer in the editor for the
<emphasis>
+
<property>struts-config.xml</property></emphasis> file, by
selecting the <emphasis>
<property>Tree</property>
</emphasis> tab at the bottom of the editor
window</para>
@@ -417,7 +426,8 @@
</emphasis> from the menu bar</para>
</listitem>
</itemizedlist>
- <para>Note the disappearance of the asterisk next to the name,
struts-config.xml.</para>
+ <para>Note the disappearance of the asterisk next to the name,
<emphasis>
+
<property>struts-config.xml</property>.</emphasis></para>
</section>
</section>
</chapter>
\ No newline at end of file