Author: sabrashevich
Date: 2007-09-03 10:56:43 -0400 (Mon, 03 Sep 2007)
New Revision: 3427
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionicon.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject10.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject11.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject12.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject13.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject14.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject15.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject16.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject17.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject18.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject19.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject20.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject21.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject22.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject6.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject7.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject8.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject9.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160 updated context
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionicon.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject1.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject10.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject11.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject11.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject12.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject12.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject13.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject13.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject14.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject14.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject15.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject15.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject16.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject17.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject17.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject18.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject18.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject19.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject19.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject2.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject20.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject20.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject21.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject21.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject22.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject22.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject3.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject6.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject7.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject8.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject9.png
===================================================================
(Binary files differ)
Property changes on:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-09-03
14:54:05 UTC (rev 3426)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-09-03
14:56:43 UTC (rev 3427)
@@ -5,6 +5,7 @@
[<!ENTITY GettingStartedWithRHDS SYSTEM
"modules/GettingStartedWithRHDS.xml">
<!ENTITY ManageJBossAS SYSTEM "modules/ManageJBossAS.xml">
<!ENTITY GetStartSeamGen SYSTEM "modules/GetStartSeamGen.xml">
+<!ENTITY DevelopAsimpleJSPWebApplication SYSTEM
"modules/DevelopAsimpleJSPWebApplication.xml">
<!ENTITY GenCURDDatabaseApp SYSTEM "modules/GenCURDDatabaseApp.xml">
<!ENTITY CURDAppWalkthrough SYSTEM "modules/CURDAppWalkthrough.xml">
<!ENTITY AddBusinessProcess SYSTEM "modules/AddBusinessProcess.xml">
@@ -31,6 +32,7 @@
&GettingStartedWithRHDS;
&ManageJBossAS;
&GetStartSeamGen;
+&DevelopAsimpleJSPWebApplication;
&GenCURDDatabaseApp;
&CURDAppWalkthrough;
<!-- TODO: drools used in this section is not available for eclipse .3.3
&AddBusinessProcess; -->
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
(rev 0)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml 2007-09-03
14:56:43 UTC (rev 3427)
@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="DevelopASimpleWebApplication"
xreflabel="DevelopASimpleWebApplication">
+ <?dbhtml filename="DevelopASimpleWebApplication.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>JSP</keyword>
+ <keyword>JSF</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Develop a simple JSP web application</title>
+ <para>In this chapter we are going to show you how to create a simple JSP
application using the Red Hat Developer Studio. The completed application will ask a user
to enter a name and click a button. The resulting new page will display the familiar
message, "Hello <name>!"</para>
+<para>You will learn how to create such an application from the beginning, along
the way demonstrating some of the powerful features of Red Hat Developer Studio. You will
design the JSP application and then run the application from inside RHDS.</para>
+ <para>We'll assume that you have already launched Red Hat Developer
Studio installed and
+also that the Red Hat perspective is the current perspective. (If not, make it active by
selecting <emphasis>Window/Open Perspective/Red Hat Developer
Studio</emphasis> from the menu bar or by selecting <emphasis>Window/
+Open Perspective/Other...</emphasis> from the menu bar and then selecting Red Hat
Developer Studio from
+the Select Perspective dialog box.)</para>
+ <section id="SettingUpTheProject">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>We are first going to create a new project for the
application.</para>
+ <orderedlist>
+ <listitem><para>Go to the menu bar and select
<emphasis>File/New/Project...</emphasis></para></listitem>
+ <listitem><para>Select <emphasis>Red Hat Developer Studio/JSF/JSF
Project</emphasis> in the New Project dialog box</para></listitem>
+ <listitem><para>Click Next ></para></listitem>
+ <listitem><para>Enter "jsfHello" as the project
name</para></listitem>
+ <listitem><para>Leave everything else as is, and click
Finish</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Create New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="TheJSFApplicationConfigurationFile">
+ <?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
+ <title>The JSF Application Configuration File</title>
+ <para>A <emphasis>jsfHello</emphasis> node should appear in the
upper-left Package Explorer view.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Click the right-pointing-arrow sign next to
<emphasis>jsfHello</emphasis> to reveal the child
nodes</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Click the right-pointing-arrow sign next to WebContent
under <emphasis>jsfHello</emphasis></para></listitem>
+ <listitem><para>Click the right-pointing-arrow sign next to WEB-INF under
WebContent.</para></listitem>
+ <listitem><para>Then double-click on the faces-config.xml node to display
the JSF application configuration file editor</para></listitem>
+ </orderedlist>
+ <para>The configuration file will be opened in Diagram View.</para>
+ <figure>
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="AddingNavigationToTheApplication">
+ <?dbhtml filename="AddingNavigationToTheApplication.html"?>
+ <title>Adding Navigation to the Application</title>
+ <para>In our simple application, the flow is defined as a single navigation rule
connecting two views (presentation files). At this point, we will create the placeholders
for the two JSP presentation files and then the navigation rule to connect them as views.
Later, we will complete the coding for the JSP presentation files. With Red Hat Developer
Studio, we can do all of this in the Diagram mode of the configuration file
editor.</para>
+ <section id="AddingTwoViewsJSPPages">
+ <?dbhtml filename="AddingTwoViewsJSPPages.html"?>
+ <title>Adding Two Views (JSP Pages)</title>
+ <orderedlist continuation="continues">
+ <listitem><para>Right-click anywhere on the diagram and select
<emphasis>New View...</emphasis> from the pop-up
+menu</para></listitem>
+ <listitem><para>In the dialog box, type
<emphasis>pages/inputname</emphasis> as the value for
From-view-id</para></listitem>
+ <listitem><para>Leave everything else as is</para></listitem>
+ <listitem><para>Click Finish</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Create New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you look in the Package Explorer view you should see a pages folder
under WebContent and the icon of the just created view. Opening it will reveal the JSP
file you just created.</para>
+ <figure>
+ <title>New View is created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Back on the diagram, right-click anywhere and select
<emphasis>New View...</emphasis> from the popup
menu.</para></listitem>
+ <listitem><para>In the dialog box, type
<emphasis>pages/greeting</emphasis> as the value for
From-view-id</para></listitem>
+ <listitem><para>Leave everything else as is</para></listitem>
+ <listitem><para>Click Finish</para></listitem>
+ </orderedlist>
+ <para>The second view is created.</para>
+ <figure>
+ <title>New View is created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="CreatingTheTransitionNavigationRule">
+ <?dbhtml filename="CreatingTheTransitionNavigationRule.html"?>
+ <title>Creating the Transition (Navigation Rule)</title>
+ <para>Let's now create a navigation transition between these two
views.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>In the diagram, select the connection icon third from the
top along the upper left
+side of the diagram
+
+ <figure>
+ <title>Connection Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionicon.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ to get an arrow cursor with a two-pronged plug at the arrow's
bottom</para></listitem>
+ <listitem><para>Click on the <emphasis>pages/inputname
page</emphasis> icon and then click on the <emphasis>pages/greeting
page</emphasis> icon</para></listitem>
+ </orderedlist>
+ <para>A transition should appear between the two icons.</para>
+ <figure>
+ <title>Transition between two views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Select <emphasis>File/Save</emphasis> from the
menu bar to save the configuration file</para></listitem>
+ </orderedlist>
+ </section>
+ </section>
+
+ <section id="AddingAManagedBeanToTheApplication">
+ <?dbhtml filename="AddingAManagedBeanToTheApplication.html"?>
+ <title>Adding a Managed Bean to the Application</title>
+ <para>To store data in the application, we will use a managed bean.
Let's create it.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Click on the Tree tab at the bottom of the editing
window</para></listitem>
+ <listitem><para>Select the Managed Beans node and then click the
<emphasis>Add...</emphasis> button displayed along the right side of the
editor window</para></listitem>
+ <listitem><para>Type in
<emphasis>jsfHello.PersonBean</emphasis> for Class and
<emphasis>personBean</emphasis> for Name. Leave Scope as is and Generate
Source Code as is (checked).</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Create managed bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Click Finish</para></listitem>
+ </orderedlist>
+ <para><emphasis>personBean</emphasis> will now be selected and three
sections of information, "Managed
+Bean", "Properties", and "Advanced", will be
displayed about it.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Under the Properties section, click the
<emphasis>Add...</emphasis> button.
+ <figure>
+ <title>Managed bean is created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para></listitem>
+ </orderedlist>
+ <orderedlist continuation="continues">
+ <listitem><para>For <emphasis>Property-Name</emphasis> type in
name. Leave everything else as is. (When <emphasis>Property-Class</emphasis>
is not filled in, String is the assumed type.).</para></listitem>
+ <listitem><para>Click Finish.</para></listitem>
+ <listitem><para>Select the personBean node in the
tree.</para></listitem>
+ <para>You should see this now:</para>
+ <figure>
+ <title>Managed bean with name property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </orderedlist>
+ <orderedlist continuation="continues">
+ <listitem><para>Select <emphasis>File/Save</emphasis> from the
menu bar.</para></listitem>
+ </orderedlist>
+ </section>
+
+ <section id="EditingTheJSPViewFiles">
+ <?dbhtml filename="EditingTheJSPViewFiles.html"?>
+ <title>Editing the JSP View Files</title>
+ <para>Now we will finish editing the JSP files for our two
"views" using Red's JSP Visual Page
+Editor.</para>
+
+<section id="inputnamejspView">
+ <?dbhtml filename="inputnamejspView.html"?>
+ <title>inputname.jsp view</title>
+ <orderedlist continuation="continues">
+<listitem><para>Click on the Diagram tab for the configuration file
editor.</para></listitem>
+<listitem><para>Open the editor for this first JSP file by double-clicking on
the /pages/inputname.
+jsp icon.</para></listitem>
+</orderedlist>
+<para>The Red Hat Visual Page Editor will open in a screen split between source
code along the top and a WYSIWIG view along the bottom:</para>
+<figure>
+ <title>inputname.jsp in visual/source mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Some JSF code will already be in the file because we selected a template
when creating the page.</para>
+ <orderedlist continuation="continues">
+<listitem><para>Select the Visual tab, so we can work with the editor
completely in its WYSIWYG
+mode.</para></listitem>
+<listitem><para>To the right of the editor, in the Red Hat Palette, expand
the JSF HTML palette folder by selecting it.</para>
+
+<figure>
+ <title>JSF HTML palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure></listitem>
+ <listitem><para>Click on "form" within this folder, drag
the cursor over to the editor, and drop it inside the red box in the
editor.</para></listitem></orderedlist>
+ <para>An "Insert Tag" dialog will be prompted</para>
+ <orderedlist continuation="continues">
+<listitem><para>In the value field next to
<emphasis>id</emphasis>, type "greeting" and click on the
Finish button.</para>
+<figure>
+ <title>Insert Tag dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+</orderedlist>
+<para>Another red box will appear inside the first red box.</para>
+<orderedlist continuation="continues">
+<listitem><para>Type "Please enter name:" inside the
boxes.</para>
+<figure>
+ <title>Editing View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+<listitem><para>Select "inputText" within the JSF HTML
palette folder and drag it into the innermost box in the editor after "Please
enter name: ".</para></listitem>
+<listitem><para>In the attributes dialog, click in the value field next to
the <emphasis
role="italic"><property>"value"</property></emphasis>
attribute and click on the <emphasis>...</emphasis>
button.</para></listitem>
+
+<listitem><para>Then, select the <emphasis>Managed
Beans/personBean/name</emphasis> node and click on the Ok button.</para>
+<figure>
+ <title>Select bean property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject15.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+<listitem><para>Back in the attributes dialog, select the Advanced tab, type
in "name" as the value
+for the <emphasis
role="italic"><property>"id"</property></emphasis>
attribute, and then click on the Finish button.</para></listitem>
+<listitem><para>Select "commandButton" within the JSF HTML
palette folder and drag it into the innermost box in the editor after the input
box.</para></listitem>
+<listitem><para>In the attributes dialog, click in the
"value" field next to the <emphasis
role="italic"><property>"action"</property></emphasis>
attribute and click on the <emphasis>...</emphasis>
button.</para></listitem>
+<listitem><para>Then, select the <emphasis>View
Actions/greeting</emphasis> node and click on the Ok
button.</para></listitem>
+<listitem><para>Back in the attributes dialog box, type in "Say
Hello" as the value for the <emphasis
role="italic"><property>"value"</property></emphasis>
attribute and then click on the Finish button.</para></listitem>
+</orderedlist>
+<para>The source coding should be something like this now:</para>
+<programlisting role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ <h:form id="greeting">
+ Please enter a name:
+ <h:inputText value="#{personBean.name}" id="name"/>
+ <h:commandButton action="greeting" value="Say Hello"/>
+ </h:form>
+ </f:view>
+ </body>
+</html>
+]]></programlisting>
+<para>The editor should look like this:</para>
+<figure>
+ <title>inputname.jsp view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+<listitem><para>Save the file by selecting
<emphasis>File/Save</emphasis> from the menu
bar.</para></listitem>
+</orderedlist>
+<para>As you see with Red Hat Visual Editor you can easily create JSF components on
a page and bind them with managed bean and view actions.</para>
+ </section>
+ <section id="greetingjspView">
+ <?dbhtml filename="greetingjspView.html"?>
+ <title>greeting.jsp view</title>
+ <para>Let's now write a code for a greeting page that will display a
name of the user.</para>
+ <orderedlist continuation="continues">
+<listitem><para>Click on the faces-config.xml tab to bring the diagram
back.</para></listitem>
+<listitem><para>Open the editor for the second file by double-clicking on the
<emphasis>/pages/greeting.jsp</emphasis> icon.</para></listitem>
+<listitem><para>Select the Visual tab, so we can work with the editor
completely in its WYSIWYG mode.</para></listitem>
+<listitem><para>Type "Hello " (note space after hello) into
the box.</para></listitem>
+<listitem><para>Select <emphasis
role="italic"><property>outputText</property></emphasis>
within the JSF HTML palette folder and drag it into the innermost box in the editor after
"Hello ".</para></listitem>
+<listitem><para>In the attributes dialog, click in
<emphasis>value</emphasis> field next to the <emphasis
role="italic"><property>"value"</property></emphasis>
attribute and click on the <emphasis>...</emphasis>
button.</para></listitem>
+<listitem><para>Then, select the <emphasis>Managed
Beans/personBean/name</emphasis> node, click on the Ok button,
+and then click on the Finish button.</para></listitem>
+<listitem><para>Right after the output field, type an exclamation point
(!).</para></listitem>
+</orderedlist>
+<para>The source coding should be something like this now:</para>
+<programlisting role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ Hello <h:outputText value="#{personBean.name}"/>!
+ </f:view>
+ </body>
+</html>
+]]></programlisting>
+<orderedlist continuation="continues">
+<listitem><para>Save the file.</para></listitem>
+</orderedlist>
+ </section>
+ </section>
+ <section id="CreatingTheStartPage">
+ <?dbhtml filename="CreatingTheStartPage.html"?>
+ <title>Creating the Start Page</title>
+ <para>You also need to create a start page as an entry point into the
application.</para>
+ <orderedlist continuation="continues">
+<listitem><para>In the Package Explorer view to the left, right-click
<emphasis>jsfHello/WebContent</emphasis> and select
+<emphasis>New/JSP File</emphasis> .</para></listitem>
+<listitem><para>For Name type in "index", for Template
select "JSPRedirect", and click Finish.</para></listitem>
+</orderedlist>
+<para>A JSP editor will open up on the newly created file.</para>
+<figure>
+ <title>index.jsp view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+<orderedlist continuation="continues">
+<listitem><para>In the Source part of the split screen, type
<emphasis>/pages/inputname.jsf</emphasis> in between the quotes for the page
attribute.</para></listitem>
+</orderedlist>
+<para>The source coding should look like this now:</para>
+<programlisting role="XML"><![CDATA[<!doctype html public
"-//w3c//dtd html 4.0 transitional//en">
+<html>
+ <head></head>
+ <body>
+ <jsp:forward page="/pages/inputname.jsf" />
+ </body>
+</html>
+]]></programlisting>
+<para>Note the <emphasis>.jsf</emphasis> extension for the file name.
This is a mapping defined in the web.xml file
+for the project for invoking JavaServer Faces when you run the application.</para>
+<orderedlist continuation="continues">
+<listitem><para>Select <emphasis>File/Save</emphasis> from the
menu bar.</para></listitem>
+</orderedlist>
+ </section>
+
+ <section id="RunningTheApplication1">
+ <?dbhtml filename="RunningTheApplication1.html"?>
+ <title>Running the Application</title>
+ <para>Everything is now ready for running our application—without having to leave
Red Hat Developer Studio —
+by using the JBoss engine that comes with the RHDS. For controlling JBoss within Studio,
there is a special view - JBoss Server View (if it is not open select
<emphasis>Window > Show View > Other > Server > JBoss
Server View</emphasis>).</para>
+<figure>
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+<listitem><para>Start up JBoss by clicking on the second icon from
left.</para></listitem>
+</orderedlist>
+<para>After the messages in the Console tabbed view stop scrolling, JBoss server is
available.</para>
+<orderedlist continuation="continues">
+<listitem><para>Click on the <emphasis>Run</emphasis> icon in the
toolbar.</para>
+<figure>
+ <title>Run icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject19.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+</orderedlist>
+<para>This is the equivalent of launching the browser and typing
http://localhost:8080/
+jsfHello into your browser. Our JSF application should now appear.</para>
+ </section>
+ <section id="RunningTheApplication">
+ <?dbhtml filename="RunningTheApplication.html"?>
+ <title>Making changes to JSP page</title>
+ <para>Red Hat Developer Studio comes with JSP design-time preview features. When
designing JSP pages you can easily preview how they will look during runtime. You can even
attach your stylesheet to the preview.</para>
+ <para>Open the inputname.jsp page and after this line</para>
+ <programlisting role="XML"><![CDATA[<h:commandButton
action="greeting" value="Say Hello"/>
+]]></programlisting>
+<para>Type the next script:</para>
+<programlisting role="XML"><![CDATA[<%= new
+java.util.Date() %>
+]]></programlisting>
+<para>Then swich to Preview tab to see the changes.</para>
+ </section>
+
+ <section id="WebXML">
+ <?dbhtml filename="WebXML.html"?>
+ <title>web.xml file</title>
+ <para>When you create a JSF project Red Hat Developer Studio is generating
web.xml file for you. You don't need to write any configuration manually. The
integrated web.xml editor comes both in source and tree modes.</para>
+ <figure>
+ <title>Web.xml editor in source mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject20.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Web.xml editor in tree mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject21.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="WarDeploy">
+ <?dbhtml filename="WarDeploy.html"?>
+ <title>Deploy with War archive</title>
+ <para>With Red Hat Developer Studio you can easily export your project in a
<emphasis>.war</emphasis> and deploy to any web server.</para>
+ <para>Just right click the project folder in Package Explorer and select
<emphasis>Export > Web > WAR file</emphasis></para>
+ <para>Then click Next > and in Export dialog specify the destination of
the <emphasis>.war</emphasis> file and press Finish.</para>
+ <figure>
+ <title>Export war file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject22.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
\ No newline at end of file
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-09-03
14:54:05 UTC (rev 3426)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-09-03
14:56:43 UTC (rev 3427)
@@ -69,8 +69,8 @@
</figure>
<para>Since you selected JPA and JSF tooling support, the project needs to
incorporate the JAR files for those frameworks on its classpath. In the next screen, you
will be able to select where those library JARs come from. The easiest is just to select
the JARs provided by the JBoss AS runtime associated with this project. That is why it is
important to chose the right JBoss AS 4.2 runtime in the project setup
window.</para>
<orderedlist continuation="continues">
- <listitem><para>Check "Server Supplied JSF
Implementation". We will use JSF implementation that comes with JBoss
server.</para></listitem>
- <listitem><para>Click Next.</para></listitem>
+ <listitem><para>Check "Server Supplied JSF
Implementation". We will use JSF implementation that comes with JBoss
server</para></listitem>
+ <listitem><para>Click Next</para></listitem>
</orderedlist>
<figure>
<title>Define JSF Implementation</title>
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-09-03
14:54:05 UTC (rev 3426)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-09-03
14:56:43 UTC (rev 3427)
@@ -13,27 +13,23 @@
<section id="ConfigJavaEnvironment">
<?dbhtml filename="ConfigJavaEnvironment.html"?>
<title>Configuring Your Java Environment</title>
- <para>You must have a working installation of JDK 1.5 before you
- install Red Hat Developer Studio. Currently it will only fully work
- with a 32-bit JVM, not a 64-bit JVM. On a 64-bit JVM the visual
- editor will fail to launch. Thus in this guide we will show you how
- to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft
- Windows Platform.</para>
+ <para>You must have a working installation of JDK 1.5 before you install Red Hat
Developer Studio. Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM.
On a 64-bit JVM the visual editor will fail to launch. Thus in this guide we will show you
how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft Windows
Platform.</para>
<section id="InstallJDK50onLinux">
<title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
<itemizedlist>
<listitem><para>Download the <ulink
url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0 (Java 2
Development Kit)</ulink> from Sun's website.
- Choose "JDK 5.0 Update <x>" (where x is the latest
update number) for download and then select "RPM in self-extracting"
file for Linux. Read the instructions on Sun's website for installing the
JDK.</para></listitem>
+ Choose "JDK 5.0 Update <x>" (where
"x" is the latest update number) for download and then select
"RPM in self-extracting" file for Linux. Read the instructions on
Sun's website for installing the JDK.</para></listitem>
<listitem><para>If you don't want to use SysV service scripts
you can install the "self-extracting file" for Linux instead of choosing
the "RPM in self-extracting" file.
In that case you can skip the next step mentioned here. But it is recommended to use
the SysV service scripts for production servers.</para></listitem>
<listitem><para>Download and install the appropriate -compat RPM from
JPackage <ulink
url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-f...;.
Please ensure you choose a matching version of the -compat package to the JDK you
installed.</para></listitem>
<listitem><para>Create an environment variable that points to the JDK
installation directory and call it JAVA_HOME. Add
<emphasis>$JAVA_HOME/bin</emphasis> to the system path to be able to run java
from the
- command line. You can do this by adding the following lines to the .bashrc file in
your home directory.</para></listitem>
- </itemizedlist>
- <programlisting><![CDATA[#In this example /usr/java/jdk1.5.0_11 is the JDK
installation directory.
+ command line. You can do this by adding the following lines to the .bashrc file in
your home directory.
+ <programlisting role="JAVA"><![CDATA[#In this example
/usr/java/jdk1.5.0_11 is the JDK installation directory.
export JAVA_HOME=/usr/java/jdk1.5.0_11
export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
+</para></listitem>
+ </itemizedlist>
<note>
<title>Note:</title>
<para>When you add $JAVA_HOME/bin to $PATH, you should add it <emphasis
role="bold">before</emphasis> the old $PATH not after it. This way, the
machine will pick up the new JVM first.
@@ -50,7 +46,7 @@
<itemizedlist>
<listitem><para>As root, type the following command at the shell prompt
and you should see something like this:</para></listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config java
+ <programlisting role="JAVA"><![CDATA[[root@vsr ~]$
/usr/sbin/alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
@@ -61,7 +57,7 @@
<itemizedlist>
<listitem><para>Repeat the same for javac and
java_sdk_1.5.0.</para></listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config
javac
+ <programlisting role="JAVA"><![CDATA[[root@vsr ~]$
/usr/sbin/alternatives --config javac
There are 1 programs which provide 'javac'.
Selection Command
-----------------------------------------------
@@ -80,8 +76,7 @@
<para>You can always override this step by setting the JAVA_HOME environment
variable as explained in the previous step.</para>
</note>
<itemizedlist>
- <listitem><para>Make sure that the java executable is in your path and
that you are using an appropriate version. To verify your Java environment, type java
-version
- at the shell prompt and you should see something like
this:</para></listitem>
+ <listitem><para>Make sure that the java executable is in your path and
that you are using an appropriate version. To verify your Java environment, type
"java -version" at the shell prompt and you should see something like
this:</para></listitem>
</itemizedlist>
<programlisting><![CDATA[[root@vsr ~]$ java -version
java version "1.5.0_11"
@@ -96,14 +91,13 @@
<title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft
Windows</title>
<itemizedlist>
<listitem><para>Download the <ulink
url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0 (Java 2
Development Kit)</ulink> from Sun's website.
- Choose "JDK 5.0 Update <x>" (where x is the latest
update number) for download and then select your Windows Platform options to perform the
installation.</para></listitem>
+ Choose "JDK 5.0 Update <x>" (where
"x" is the latest update number) for download and then select your
Windows Platform options to perform the installation.</para></listitem>
<listitem><para>Create an environment variable called JAVA_HOME that
points to the JDK installation directory, for example:</para></listitem>
</itemizedlist>
- <programlisting><![CDATA[C:\Program
Files\Java\jdk1.5.0_11\]]></programlisting>
+ <para><emphasis>C:\Program
Files\Java\jdk1.5.0_11\</emphasis></para>
<para>In order to run java from the command line add the
<emphasis>jre\bin</emphasis> directory to your path, for
example:</para>
- <programlisting><![CDATA[C:\Program
Files\Java\jdk1.5.0_11\jre\bin]]></programlisting>
- <para>To do this, open the Control Panel from the Start Menu, switch to
Classic View if necessary, open the System Control Panel applet, select the Advanced Tab,
- and click on the Environment Variables button.</para>
+ <para><emphasis>C:\Program
Files\Java\jdk1.5.0_11\jre\bin</emphasis></para>
+ <para>To do this, open the Control Panel from the Start Menu, switch to
Classic View if necessary, open the System Control Panel applet, select the Advanced Tab,
and click on the Environment Variables button.</para>
</section>
</section>
@@ -112,13 +106,17 @@
<title>Red Hat Developer Studio Installation</title>
<section id="Instfromdownver">
<title>Installing from the downloaded version</title>
+ <para>RHDS comes with simple installer, bundled with tested/pre-configured
versions of Eclipse, Webtools, JBossEAP, and SpringIDE.</para>
<itemizedlist>
<listitem>
<para>Download the appropriate installation file for your platform from
<ulink
url="http://www.redhat.com/developers/rhds/index.html">Red Hat
website</ulink>.</para>
</listitem>
<listitem>
- <para>Run rhdevstudio-linux-gtk-1.0.0.beta1.jar and follow the instructions
presented by the installation wizard</para>
- </listitem>
+ <para>Run in console:</para>
+ <programlisting role="JAVA"><![CDATA[java -jar
rhdevstudio-linux-gtk-1.0.0.beta1.jar
+]]></programlisting></listitem>
+ <listitem><para>and follow the instructions presented by the
installation wizard</para></listitem>
+
</itemizedlist>
<figure>
@@ -214,23 +212,30 @@
<orderedlist>
<listitem>On Red Hat based Linux distributions install the xpLib.i386
package</listitem>
-<listitem>Type ln -s libstdc++.so.5.0.7 libstdc++.so.5</listitem>
-<listitem>and/or use yum install libXp</listitem>
+<listitem>Type
+<programlisting role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7
libstdc++.so.5
+]]></programlisting>
+</listitem>
+<listitem>and/or use
+<programlisting role="JAVA"><![CDATA[yum install libXp
+]]></programlisting>
+ </listitem>
<listitem>Open the RHDS perspective. If you see the Help view open, close it and
restart RHDS</listitem>
<listitem>If none of these work, do the following:
<itemizedlist>
-<listitem>Clear the Eclipse log file,
<workspace>\.metadata\.log</listitem>
+<listitem>Clear the Eclipse log file,
<emphasis><workspace>\.metadata\.log</emphasis></listitem>
<listitem>Start Eclipse with the -debug option:
-<para>eclipse -debug</para></listitem>
-<listitem>Post the Eclipse log file (<workspace>\.metadata\.log) on
the forums.</listitem>
+<programlisting role="JAVA"><![CDATA[eclipse -debug
+]]></programlisting>
+</listitem>
+<listitem>Post the Eclipse log file
(<emphasis><workspace>\.metadata\.log</emphasis>) on the
forums.</listitem>
</itemizedlist>
</listitem>
</orderedlist>
<para><emphasis role="bold">Do I need to have JBoss server
installed to run Red Hat Developer Studio?</emphasis></para>
- <para>No. Red Hat Developer Studio already comes bundled with JBoss server. We
bundle it together so that you don't need to download any
- additional software and can test your application in a Web browser right
away.</para>
+ <para>No. Red Hat Developer Studio already comes bundled with JBoss server. We
bundle it together so that you don't need to download any additional software and
can test your application in a Web browser right away.</para>
<para>If you want to use a different JBoss server installation, after Red Hat
Developer Studio is installed open Servers View (select <emphasis>Window >
Show View > Others > Server > Servers</emphasis>), then right
click on this <emphasis>view > New > Server</emphasis> and
follow the wizards steps to point to another Jboss server installation.</para>
<para>Red Hat Developer Studio works with any servlet container, not just JBoss.
For more information on deployment, please see the Deploying Your Application
section.</para>
</section>
@@ -245,7 +250,9 @@
<title>Troubleshooting, Problems, Configuration, Error Messages</title>
<para><emphasis role="bold">Is it possible to increase the
performance of Eclipse after installing your product? My Eclipse now
crawls.</emphasis></para>
<para>Red Hat Developer Studio preconfigures eclipse via the eclipse.ini file to
allocate extra memory, but if you for some reason need more memory then by default, you
can manually make adjustments in this file. For example:</para>
- <para>-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m</para>
+ <programlisting role="JAVA"><![CDATA[-vmargs -Xms128m -Xmx512m
-XX:MaxPermSize=128m
+]]></programlisting>
+
<para><emphasis role="bold">How can I add my own tag library to
the Red Hat Palette?</emphasis></para>
<para>See <ulink
url="http://www.redhat.com/developers/rhds/JSFTools/JavaServerFacesS...
Tag Libraries</ulink> in JBossJSFTools Guide.</para>