Author: ykryvinchanka
Date: 2007-11-13 07:36:45 -0500 (Tue, 13 Nov 2007)
New Revision: 4872
Added:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
Removed:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GetStartSeamGen.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GettingStartedWithRHDS.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/ManageJBossAS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-298 GSG .Xml files names changed + pictures sorted
into corresponding folders and named as "chapter_name_?"
Deleted:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GetStartSeamGen.xml
===================================================================
---
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GetStartSeamGen.xml 2007-11-13
11:30:09 UTC (rev 4871)
+++
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GetStartSeamGen.xml 2007-11-13
12:36:45 UTC (rev 4872)
@@ -1,456 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="GetStartSeamGen" xreflabel="GetStartSeamGen">
- <?dbhtml filename="GetStartSeamGen.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>Red Hat Developer Studio</keyword>
- <keyword>Seam</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Write Your First Seam Web Application</title>
-
- <para>The Red Hat Developer Studio provides sophisticated tools for enterprise
applications. With the Red Hat Developer Studio, you can get started very quickly with a
web prototype, and then scale up your application to include enterprise features (e.g.,
business processes, web services, etc.) using the same developer tools. It is a
"scalable" RAD (Rapid Application Development) tool.</para>
-
- <para>A core element that makes the Red Hat Developer Studio
"scalable" is the JBoss <property>Seam framework</property>.
Seam is a fully featured application framework on top of Java EE 5. It is also one of the
most popular enterprise Java framework today. Seam deeply integrates many other
standard-based or open source frameworks (e.g., JSF, EJB3, JMS, Web Services, jBPM, JBoss
Rules, Ajax4jsf, RichFaces, Facelets, Spring, iText, Quartz, TestNG, etc.), and provides a
single programming model for developers to "drive" those underlying
frameworks via simple annotated POJOs (Plain Old Java Objects). It makes life easier for
developers to tackle complex enterprise applications with many component
frameworks.</para>
-
- <para>In this chapter, we will cover how to build a simple Seam web application
in minutes with the Red Hat Developer Studio.</para>
-
- <section>
- <title>Create a Seam Project</title>
-
- <para>To create a new web application in <property>Seam</property>,
select <emphasis><property>New > Project ... > Seam >
Seam Web Project</property></emphasis>. You will be prompted to enter a name
and a location directory for your new project. You will also be asked to choose a JBoss AS
server to deploy the project. You must choose the JBoss AS 4.2.0 instance we had defined
in the JBoss AS Server manager view.</para>
-
- <figure>
- <title>Create a Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/SeamNewProj01.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Next, you will be asked to select the "features" you
want to use in your project. This allows Red Hat Developer Studio to setup the appropriate
tooling for your project. Since JBoss Seam integrates all popular Java EE frameworks, you
can select any combination of technologies from the list. Here, for this project, we will
select Dynamic Web Module, Java, Java Persistence (JPA), JavaServer Faces (JSF), and Seam
Facet for a typical database-driven web application.</para>
-
- <figure>
- <title>Select Toolings for the Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/SeamNewProj02.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>A dynamic web application contains both web pages and Java code. The
wizard will ask you where you want to put those files. You can just leave the default
values.</para>
-
- <figure>
- <title>Select Directory Names for Web Pages and Java Files</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/SeamNewProj03.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- <para>We will use a default connection provided by RHDS.</para>
- <orderedlist>
- <listitem><para>Click
<emphasis><property>Next</property></emphasis> in the dialog
<property>JPA Facet</property></para></listitem>
- </orderedlist>
- <figure>
- <title>Select Provider for JPA JARs</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/SeamNewProj04.png"/>
- </imageobject>
- </mediaobject>
- </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 <emphasis><property>Server Supplied
JSF Implementation</property></emphasis>. We will use JSF implementation that
comes with JBoss server</para></listitem>
- <listitem><para>Click
<emphasis><property>Next</property></emphasis></para></listitem>
- </orderedlist>
- <figure>
- <title>Define JSF Implementation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/WriteYourFirst/SeamNewProj044.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We will also use a default Hibernate Dialect -
<emphasis>org.hibernate.dialect.HSQLDialect</emphasis> and deploy as a
<emphasis>war</emphasis> archive.</para>
-
- <para>The project setup wizard also asks you to configure how Seam generates
code for the project. The Seam Home Folder should point to a valid Seam distribution. By
default, it is set to the Seam distribution bundled in your Red Hat Developer Studio tool.
If you need another one choose it from the drop down list box:</para>
-
- <figure>
- <title>Enter Java Packages for Generated Code</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/WriteYourFirst/SeamNewProj045.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-<para>If in this list there is no Seam runtime you want to use add it through
<emphasis><property>Window > Preferences > JBoss Tools >
Web > Seam</property></emphasis> or just click
<emphasis><property>Add</property></emphasis> button near the Seam
Runtime list:</para>
-<figure>
- <title>Add New Seam Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/WriteYourFirst/SeamNewProj050.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-<para>For the deployment format, choose WAR deployment if you want to use POJOs for
UI event handling and business logic; choose EAR deployment if you want to EJB3 beans for
added features. In most web applications, the WAR deployment option would suffice. You
should also enter Java packages for the entity beans (for database mapping) and session
beans (for action handlers). All generated code will be placed in those packages.
</para>
-
- <para>Click on
<emphasis><property>Finish</property></emphasis> to generate a
project. The generated project contains all the necessary library JARs, XML configuration
files, the ANT build script, as well as simple XHTML web pages and Java classes for the
skeleton web application. The project will be shown in Project Explorer as well as in
<emphasis><property>Seam Components</property></emphasis> view. If
Seam Components view is not open select <emphasis><property>Window >
Show View > Seam Components</property></emphasis>.</para>
- <figure>
- <title>Seam Components View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/WriteYourFirst/SeamNewProj051.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can hide unused Seam components from this view.</para>
- <itemizedlist>
- <listitem><para>Click the button
<emphasis><property>Menu</property></emphasis> on the top of the
view (down-pointing arrow)</para></listitem>
- <listitem><para>Choose <emphasis><property>Customize
View..</property></emphasis></para></listitem>
- <listitem><para>In the dialog <emphasis><property>Available
Customization</property></emphasis> check the filter you want to apply under
the <emphasis><property>Filters</property></emphasis>
tab</para></listitem>
- </itemizedlist>
- <figure>
- <title>Seam Components Filtering</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/WriteYourFirst/SeamNewProj052.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section>
- <title>Build and Deploy the Seam Application</title>
-
- <para>Once the application is generated, you can use the "Run on
server" menu to build and deploy it into the JBoss AS runtime associated with the
project. All you need is to start JBoss AS in the server manager, and load the browser at
URL
http://localhost:8080/MySeamProj/. You should see the following web
page.</para>
-
- <figure>
- <title>The Generated Application in Action</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/WriteYourFirst/startedapplication.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To make simple changes to the page, you just need to double click on the
<emphasis><property>WebContent/home.xhtml
file</property></emphasis> and edit it in the visual editor. Notice that the
visual editor lets you both the XHTML code and the rendered page. The rendered view is
designed to make it easy to find stuff in a complex XHTML page.</para>
-
- <figure>
- <title>Making Changes in the Visual Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/SeamJsfEditor.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Once you finished editing, save the file
(<emphasis><property>File > Save</property></emphasis>),
re-deploy the application, and reload the browser to see the changes.</para>
-
- <figure>
- <title>The Front Page is Changed</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!-- Not yet ...
- <para>Notice that we do not need to re-build and re-deploy the application.
Just save the edited page and reload the browser.</para>
- -->
-
- </section>
-
- <section>
- <title>Add a Web Page and an Action</title>
-
- <para>To add a new page and related UI action to the project, use the
<emphasis><property>New > Other ... > Seam > Seam
Form</property></emphasis> wizard. You are prompted to enter the name of the
web page, the name for the Seam component that handles UI actions from the page, and UI
action method name.</para>
-
- <figure>
- <title>New Form for the Application</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/newseamproj22.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The wizard generate a web page with a single text input field and an
action button. Notice that the generated page uses
<emphasis>layout/template.xhtml</emphasis> as a template. The template page
provides the page header, footer, side menu, and CSS styles (see the template.xhtml for
more details). The Simplepage.xhtml is assembled into the template when the
Simplepage.seam URL is loaded.</para>
-
- <programlisting role="XML"><![CDATA[
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
xmlns:s="http://jboss.com/products/seam/taglib"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:h="http://java.sun.com/jsf/html"
- template="layout/template.xhtml">
-
-<ui:define name="body">
-
- <h1>Simplepage</h1>
- <p>Generated form page</p>
-
- <h:messages globalOnly="true" styleClass="message"/>
-
- <h:form id="simpleAction">
- <div class="dialog">
- <s:validateAll>
- <div class="prop">
- <span class="name">Value</span>
- <span class="value">
- <s:decorate>
- <h:inputText id="value" required="true"
- value="#{simpleAction.value}"/>
- </s:decorate>
- </span>
- </div>
- </s:validateAll>
- </div>
- <div class="actionButtons">
- <h:commandButton id="hello" value="hello"
- action="#{simpleAction.hello}"/>
- </div>
- </h:form>
-
-</ui:define>
-
-</ui:composition>
-]]></programlisting>
- <figure>
- <title>Generated Form</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/newseamproj23.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <emphasis>#{simpleAction.value}</emphasis> notation on
the web page maps to the "value" property in the backend component named
"simpleAction", and the
<emphasis>#{simpleAction.hello}</emphasis> notation indicates that the
<emphasis><property>hello()</property></emphasis> method is called
when the button is clicked on. Here is the "simpleAction" named backend
Seam component generated by the wizard.</para>
-
- <programlisting role="JAVA"><![CDATA[
-@Name("simpleAction")
-public class SimpleAction {
-
- @Logger private Log log;
-
- @In
- FacesMessages facesMessages;
-
- private String value;
-
- //seam-gen method
- public String hello()
- {
- //implement your business logic here
- log.info("simpleAction.echo() action called with:
#{simpleAction.value}");
- facesMessages.add("echo #{simpleAction.value}");
- return "success";
- }
-
- //add additional action methods
-
- @Length(max=10)
- public String getValue()
- {
- return value;
- }
-
- public void setValue(String value)
- {
- this.value = value;
- }
-
-}
-]]></programlisting>
-
- <para>Load the Simplepage.seam in the web browser. Type something in the text
field and click on the "hello" button. A JSF message containing the
input string is created by the
<emphasis><property>SimpleAction.hello()</property></emphasis>
method. The message is displayed on the page via the <emphasis
role="bold"><property><h:messages></property></emphasis>
tag.</para>
-
- </section>
-
- <section>
- <title>Input Validation</title>
-
- <para>Notice that in the generated SimpleAction class, there is a
<emphasis>@Length</emphasis> annotation to validate the input when the input
string is bound to <emphasis>#{simpleAction.value}</emphasis>. To see how this
works, enter a text string longer than 10 chars and click on the button. This is what you
should see.</para>
-
- <figure>
- <title>The Input Validation in Action</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Seam supports many different input validation annotations. To see an
example, you can replace the <emphasis>@Length(max=10)</emphasis> annotation
with the following. It would require the input string to have a first name and last name
separated by a space. If the validation fails, the web page would print the customized
error message.</para>
-
- <programlisting role="JAVA"><![CDATA[
-@NotNull
-(a)Pattern(regex="^[a-zA-Z.-]+ [a-zA-Z.-]+",
- message="Need a firstname and a lastname")
-public String getValue()
-{
- return value;
-}
-]]></programlisting>
-
- <para>Save the Java file, deploy the application, and reload the browser to see
the new validation scheme in action.</para>
-
- <figure>
- <title>More Input Validation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section>
- <title>Add a new UI Component</title>
-
- <para>Now, let's add a little more logic to the application. We will
add a new boolean property to the action component. If it is set to true, the action would
capitalize the input string and display it on the web page. The following code in the
SimpleAction class implements the logic.</para>
-
- <programlisting
role="JAVA"><![CDATA[@Name("simpleAction")
-public class SimpleAction {
-
- private boolean convertToCap;
-
- public boolean getConvertToCap () { return convertToCap; }
- public void setConvertToCap (boolean b) { convertToCap = b; }
-
- public String hello()
- {
- if (convertToCap) {
- value = value.toUpperCase ();
- }
- return null;
- }
- ... ...
-}
-]]></programlisting>
-
- <para>Next, on the web page, add the following line to display the value
property on the simpleAction component. Notice that code completion is supported for the
JSF EL expression.</para>
-
- <programlisting role="XML"><![CDATA[<p><b>Hello,
#{simpleAction.value}</b></p>
-]]></programlisting>
-
- <para>Finally, on the web page, we add a boolean selection box component. It is
bound to the
<emphasis><property>convertToCap</property></emphasis> property on
the backend component.</para>
-
- <programlisting role="XML"><![CDATA[<h:selectBooleanCheckbox
title="convertToCap"
- value="#{simpleAction.convertToCap}" />
-Capitalize the input?
-]]></programlisting>
-
- <para>Deploy the application and see it in action now.</para>
-
- <figure>
- <title>Add UI Components and Business Logic</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section>
- <title>Add Security to the Application</title>
-
- <para>You have probably noticed that the web page template has a login link at
the top of the page. You can use the Seam security framework to secure access to any web
page or web action. You can implement the login logic in the
<emphasis>checkLoggedIn</emphasis> method. In the following example, we just
use hardcoded username and password. But you can easily change it to use database, LDAP or
any other means.</para>
-
- <programlisting role="JAVA"><![CDATA[
-]]></programlisting>
-
- <para>Then, on the action method, you can use the
<emphasis>@AroundInvoke</emphasis> annotation to specify that it is only
invoked by authenticated users.</para>
-
- <programlisting role="JAVA"><![CDATA[public class
LoggedInInterceptor
- {
- @AroundInvoke
- public Object checkLoggedIn(InvocationContext invocation) throws Exception
- {
- boolean isLoggedIn = Contexts.getSessionContext().get("loggedIn")!=null;
- if (isLoggedIn) {
- //the user is already logged in
- return invocation.proceed();
- }
- else {
- //the user is not logged in, fwd to login page
- return "login";
- }
- }
-}
-]]></programlisting>
-
- <para>Now, re-deploy the application and try the action button. The application
redirects to the <emphasis>login</emphasis> page asking for login credentials.
The method is invoked after you successfully logged in.</para>
-
- <figure>
- <title>Access Control for Action Methods</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/WriteYourFirst/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We can also secure web pages. You can edit the
<emphasis>Authenticator.java</emphasis> file to put an access constraint on
the login page.</para>
-
- <programlisting
role="JAVA"><![CDATA[package.org.domain.MySeamProj.session;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.security.identity;
-
- @Name ("authenticator")
- public class Authenticator
- {
- @Logger Log log;
- @In Identity identity;
-
- public boolean authenticate()
- {
- log.info("authenticating #0", identity.getUserName());
- //write your authentication logic here,
- //return true if the authentication was
- //successful, false otherwise
- identity.addRole("admin");
- return true;
- }
- }
-]]></programlisting>
-
- <para>You can try to load the
http://localhost:8080/MySeamProj/ URL in the
browser and it will redirect to ask for login.</para>
-
- </section>
-
-
-<section id="OtherRelevantResourcesOnTheTopic2">
-<?dbhtml filename="OtherRelevantResourcesOnTheTopic2.html"?>
-<title>Other relevant resources on the topic</title>
-<para>Seam on JBoss: <ulink
url="http://www.jboss.com/products/seam">Seam
Framework</ulink></para>
-
-<para>Ten Good Reasons to use Seam: <ulink
url="http://www.jboss.com/products/seam/whyseam">Why
Seam</ulink></para>
-<para>Getting Started: <ulink
url="http://labs.jboss.com/jbossseam/gettingstarted">Getting Started with
JBoss Seam</ulink></para>
-<para>Wiki: <ulink
url="http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam">JBoss
Wiki</ulink></para>
-<para>FAQ: <ulink
url="http://labs.jboss.com/jbossseam/faq/index.html">JBoss Seam
FAQ</ulink></para>
-<para>Downloads: <ulink
url="http://labs.jboss.com/jbossseam/download">JBoss Seam
Downloads</ulink></para>
-<para>Jira: <ulink
url="http://jira.jboss.org/jira/browse/JBSEAM">Jira issue
tracker</ulink></para>
-<para>Rules Framework: <ulink
url="http://www.jboss.com/products/rules">JBoss
Rules</ulink></para>
-<para>Seam Tools - New and Noteworthy: <ulink
url="http://fisheye.jboss.org/browse/~raw,r=3993/JBossTools/trunk/do...
new and noteworthy</ulink></para>
-
-</section>
-</chapter>
Deleted:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GettingStartedWithRHDS.xml
===================================================================
---
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GettingStartedWithRHDS.xml 2007-11-13
11:30:09 UTC (rev 4871)
+++
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/GettingStartedWithRHDS.xml 2007-11-13
12:36:45 UTC (rev 4872)
@@ -1,356 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="GettingStartedWithRHDS"
xreflabel="GettingStartedWithRHDS">
- <?dbhtml filename="GettingStartedWithRHDS.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>Red Hat Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Getting Started with Red Hat Developer Studio</title>
- <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 fails 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>
- <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've installed.</para></listitem>
- <listitem><para>Create an environment variable that points to the JDK
installation directory and call it JAVA_HOME. Add
<emphasis><property>$JAVA_HOME/bin</property></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>
- <programlisting><![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>
-</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.
- You only need to run "alternative" as a safe guard for the right
JVM.</para>
- </note>
-
- <para>Set this variable for your account doing the installation and also for the
user account that will run the server.</para>
- <itemizedlist>
- <listitem><para>If you have more than one version of JVM installed on
your machine, make sure you are using the JDK 1.5 installation as the default java and
javac.
- You can do this using the alternatives system. The alternatives system allows
different versions of Java from different sources to co-exist on your
system.</para></listitem>
- </itemizedlist>
- <section id="SelectAlternativesforJava">
- <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
- <itemizedlist>
- <listitem><para>As a root user, 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
-There are 2 programs that provide 'java'.
-Selection Command
------------------------------------------------
- 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
-*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
-Enter to keep the current selection[+], or type selection
number:]]></programlisting>
- <para>Make sure the Sun version [jre-1.5.0-sun in this case] is selected
(marked with a '+' in the output), or select it by entering its number
as prompted.</para>
- <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
-There is 1 program that provides 'javac'.
- Selection Command
------------------------------------------------
-*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
-Enter to keep the current selection[+], or type selection number:
-
-[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
-There is 1 program that provide 'java_sdk_1.5.0'.
- Selection Command
------------------------------------------------
-*+ 1 /usr/lib/jvm/java-1.5.0-sun
-Enter to keep the current selection[+], or type selection
number:]]></programlisting>
- <para>You should verify that java, javac and java_sdk_1.5.0 all point to the
same manufacturer and version.</para>
- <note>
- <title>Note:</title>
- <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>
- </itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ java -version
-java version "1.5.0_11"
-Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
-Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode,
sharing)]]></programlisting>
-</section>
-
- </section>
- <section id="InstallJDK50onWindows">
- <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>
- <listitem><para>Create an environment variable called JAVA_HOME that
points to the JDK installation directory, for example:
-<para><emphasis>C:\Program
Files\Java\jdk1.5.0_11\</emphasis></para></para></listitem>
- </itemizedlist>
-
- <para>In order to run java from the command line, add the
<emphasis>jre\bin</emphasis> directory to your path, for
example:</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 (System), select the
Advanced Tab, and click on the Environment Variables button.</para>
- </section>
- </section>
- <section id="InstallingRHDS">
- <?dbhtml filename="InstallingRHDS.html"?>
- <title>Red Hat Developer Studio Installation</title>
- <section id="Instfromdownver">
- <title>Installing from the downloaded version</title>
- <para>RHDS comes with a simple installer, bundled with tested/pre-configured
versions of Eclipse, Webtools, JBossEAP, Seam, 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 in console:</para>
- <programlisting role="JAVA"><![CDATA[java -jar
rhdevstudio-linux-gtk-1.0.0.beta2.jar
-]]></programlisting></listitem>
- <listitem><para>Follow the instructions presented by the installation
wizard</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>Red Hat Developer Studio Installation Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/install.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>Provide the installation
path</para></listitem>
- <listitem><para>Select Java VM</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>Select Java VM</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/install3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Selecting <emphasis><property>Default Java
VM</property></emphasis> you set default Java VM of your system (to verify
your Java environment, type "java -version" in console).</para>
- <para>Selecting <emphasis><property>Specific Java
VM</property></emphasis> you can provide the path to non-default Java
VM.</para>
-
- <note>
- <title>Note:</title>
- <para>Red Hat Developer Studio needs Java 5 and doesn't work with gij
Java.</para>
- </note>
-
- <itemizedlist>
- <listitem><para>Installation process includes JBoss Enterprise
Application Platform. Select
<emphasis><property>Yes</property></emphasis> to use it in Red Hat
Developer Studio.</para></listitem>
- </itemizedlist>
-
-<para></para>
-
- <figure>
- <title>JBoss Enterprise Application Platform Installing</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/install2.png"/>
- </imageobject>
- </figure>
- <para></para>
- <note>
- <title>Note:</title>
- <para>The installer installs JBoss Enterprise Application Platform for
running your applications if you select this option during the installation process.
- If you want to use a different server than ours, you can change the setting in Red
Hat Developer Studio.</para>
- </note>
-
- <itemizedlist>
- <listitem><para>Check your installation paths and see the components
will be installed. Click
<emphasis><property>Next</property></emphasis> to start
installation.</para></listitem>
- </itemizedlist>
-
- <para></para>
-
- <figure>
- <title>Summary Information</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/install4.png"/>
- </imageobject>
- </figure>
-
- </section>
- </section>
- <section id="Welcome">
- <title>Welcome to Red Hat Developer Studio</title>
- <para>The welcome page is the first page you see when you first launch Red Hat
Developer Studio. </para>
-
- <figure>
- <title>Welcome to Red Hat Developer Studio</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/welcome1.png"/>
- </imageobject>
- </figure>
-
- <para>With the help of its page you will be able:</para>
- <itemizedlist>
- <listitem><para>to get quick access to Getting Started Documentation
(guides, tutorials and viewlets)</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>Getting Started Documentation</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/welcome2.png"/>
- </imageobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>to create new Seam, jBPM Process, JSF or Struts projects
using RHDS wizards</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>Create New...</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/welcome3.png"/>
- </imageobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>to get short description of perspectives that RHDS offers
for more productive development</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>Perspectives</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/welcome4.png"/>
- </imageobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>to visit Red Hat Developer Studio web
resources.</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>Web Resources</title>
- <imageobject>
- <imagedata fileref="images/GetStartRHDS/welcome5.png"/>
- </imageobject>
- </figure>
-
- <para>Start work with Red Hat Developer Studio by clicking on
<emphasis><property>Workbench</property></emphasis> button or
simply close the welcome page.</para>
-
- </section>
-
- <section id="Upgrading">
- <?dbhtml filename="Upgrading.html"?>
- <title>Upgrading</title>
- <para>To upgrade, just uninstall your current version and install the new
one.</para>
- </section>
- <section id="Uninstalling">
- <?dbhtml filename="Uninstalling.html"?>
- <title>Uninstalling</title>
- <itemizedlist>
- <listitem>Make sure Red Hat Developer Studio is not running</listitem>
- <listitem>Uninstall your current version of Red Hat Developer Studio by running
uninstaller</listitem>
-</itemizedlist>
- </section>
- <section id="Support">
- <?dbhtml filename="Support.html"?>
- <title>Support</title>
- <para>If you have comments or questions, you can discuss them at our
- <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Hat Developer Studio Forum</ulink>.</para>
- <para>When writing to the forum for questions, please include the following
information:</para>
- <orderedlist>
- <listitem><para>Red Hat Developer Studio
version</para></listitem>
- <listitem><para>Exact error message</para></listitem>
- <listitem><para>Steps to reproduce the
issue</para></listitem>
- </orderedlist>
- </section>
-<section id="FAQ">
- <?dbhtml filename="FAQ.html"?>
- <title>FAQ</title>
- <para>For easy reference to Red Hat Developer Studio related questions, our FAQ
provides answers to our most "popular" questions.
- The sections of questions are organized by type. </para>
-<!-- <section id="Before_Installing">
- <title>Before Installing, Tutorials, Examples, Readme Files</title>
- <para><emphasis role="bold">I'm looking for examples, do you
have any?</emphasis></para>
- <para>Yes, simply go to our <ulink
url="http://exadel.com/web/portal/products/Tutorials">tutorials
page</ulink></para>
- <para><emphasis role="bold">Where can I find the Red Hat
Developer Studio readme file?</emphasis></para>
- <para>It's located at this page: <ulink
url="http://www.exadel.com/web/portal/products/ReleaseNotes">...
Notes</ulink></para>
- <para><emphasis role="bold">Where can I find some documentation
for Red Hat Developer Studio?</emphasis></para>
- <para>Try these resources: <ulink
url="http://www.exadel.com/exadelstudio/help/">User
Guide</ulink></para>
- <para><emphasis role="bold">What version of Eclipse does Red Hat
Developer Studio support?</emphasis></para>
- <para>Red Hat Developer Studio works with Eclipse 3.3</para>
- </section> -->
- <!--<section id="Downloading">
- <title>Downloading</title>
- <para><emphasis role="bold">Where can I download a copy of Red
Hat Developer Studio?</emphasis></para>
- <para>Go to <ulink
url="http://www.redhat.com/developers/rhds/index.html">Download
Page</ulink></para>
- </section>-->
- <section id="Installation_Issues">
- <title>Installation Issues</title>
- <para><emphasis role="bold">Visual Editor does not start under
Linux</emphasis></para>
- <para>Linux users may need to do the following to get the visual editor to work
correctly
-on their machines.</para>
-
-<orderedlist>
-<listitem>On Red Hat based Linux distributions install the xpLib.i386
package</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,
<emphasis><workspace>\.metadata\.log</emphasis></listitem>
-<listitem>Start Eclipse with the -debug option:
-<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>If you want to use a different JBoss server installation, after Red Hat
Developer Studio is installed open Servers View (select
<emphasis><property>Window > Show View > Others > Server
> Servers</property></emphasis>), then right click on this
<emphasis><property>view > New >
Server</property></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>
- <section id="Importing_Projects">
- <title>Importing Projects</title>
- <para><emphasis role="bold">I have an existing Struts or JSF
project. Can I open the project in RHDS?</emphasis></para>
- <para>Yes. From main menu select <emphasis><property>File >
Import > Other > JSF Project (or Struts
Project)</property></emphasis> and follow wizards steps.</para>
- <para><emphasis role="bold">Can I import a .war
file?</emphasis></para>
- <para>Yes. Select <emphasis><property>File > Import >
Web > WAR file</property></emphasis>, then follow importing
steps.</para>
- </section>
- <section id="Troubleshooting">
- <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>
- <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>
- <para><emphasis role="bold">I see the Oracle ADF Faces component
library tags in the Red Hat Palette, but I can't seem to find the libraries for
ADF. How do I use this component library with RHDS?</emphasis></para>
- <para>See <ulink
url="http://www.redhat.com/developers/rhds/JSFTools/JavaServerFacesS...
Support for the Oracle ADF Components Library</ulink> in the RHDS User
Guide.</para>
- </section>
-</section>
-
-<section id="OtherRelevantResourcesOnTheTopic33">
-<?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
-<title>Other relevant resources on the topic</title>
-<para>RHDS on JBoss: <ulink
url="http://labs.jboss.com/rhdevstudio/">Red Hat Developer
Studio</ulink></para>
-<para>Forum: <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Forum</ulink></para>
-<para>Download: <ulink
url="http://www.redhat.com/developers/rhds/index.html">RHDS
Download</ulink></para>
-</section>
-</chapter>
-
Deleted:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/ManageJBossAS.xml
===================================================================
---
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/ManageJBossAS.xml 2007-11-13
11:30:09 UTC (rev 4871)
+++
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/ManageJBossAS.xml 2007-11-13
12:36:45 UTC (rev 4872)
@@ -1,249 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="ManageJBossASFromRedHatDeveloperStudio"
xreflabel="ManageJBossASFromRedHatDeveloperStudio">
- <?dbhtml filename="ManageJBossASFromRedHatDeveloperStudio.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>Red Hat Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Deploy</keyword>
- <keyword>Deployment</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Manage JBoss AS from Red Hat Developer Studio</title>
- <para>Red Hat Developer Studio ships with <property>JBoss EAP
v.4.2</property> bundled. When you followed the default installation of Red Hat
Developer Studio, you should already have a JBoss 4.2 server installed and defined. To run
JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although you may be
able to start the server with it.</para>
- <section id="JBossbundled">
- <?dbhtml filename="JBossbundled.html"?>
- <title>How to Manage the JBoss AS Bundled in RHDS</title>
- <para></para>
- <section id="StartingServer">
- <?dbhtml filename="StartingServer.html"?>
- <title>Starting JBoss server</title>
- <para>Starting <property>JBoss server</property> is quite simple. Red
Hat Developer Studio allows you to control its behaviour with the help of a special
toolbar: where you could start it in a regular or debug mode, stop it or restart
it.</para>
- <itemizedlist>
- <listitem><para>To launch the server click the green-with-white-arrow
icon on the <property>JBoss Server View </property>or right click server name
in this view and select
<emphasis><property>Start</property></emphasis>. If this view is
not open, select <emphasis><property>Window > Show View > Other
> Server > JBoss Server
View</property></emphasis></para></listitem>
- </itemizedlist>
- <figure>
-<title>Starting from Icon</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/startingfromicon.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
-<figure>
-<title>Starting from JBoss Server View</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/startingfromserversview.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
-<para>While launching, server output is written to the Console view:</para>
-
-<figure>
-<title>Console Output</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/consoleoutput.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>When the server is started you should see
<emphasis><property>Started</property></emphasis> right to its
name in <property>JBoss Server View</property> (column
"Status").</para>
-<figure>
-<title>Server is Started</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/serverstarted.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>To see event log after the server is started, expand
<property>Event Log</property> branch beneath JBoss Server View:</para>
-<figure>
-<title>Event Log</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/ManageJBossAS/eventlog.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- </section>
- <section id="StoppingJBoss">
- <?dbhtml filename="StoppingJBoss.html"?>
- <title>Stopping JBoss Server</title>
- <para>To stop the server, click the
<emphasis><property>Stop</property></emphasis> icon in JBoss
Server View or right click the server name and press
<emphasis><property>Stop</property></emphasis>.</para>
- <figure>
-<title>Stopping Server</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/stoppingserver2.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>When the server is stopped you will see
<emphasis><property>Stopped</property></emphasis> next to its name
in the Status column.</para>
- </section>
- <section id="ServerPreferences">
- <?dbhtml filename="ServerPreferences.html"?>
- <title>Server Container Preferences</title>
- <para>You can control how Red Hat Developer Studio interacts with servlet
containers in Preferences. Select <emphasis><property>Window >
Preferences > JBoss Tools > JBoss Servers</property></emphasis>
and switch to the desired server:</para>
- <figure>
-<title>Server Preferences</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/serverpreferences.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>Also you can double click the server name in JBoss Server View and open
an overview of the server. Here you can specify some common settings: host name, server
name, runtime and so on.</para>
-<figure>
-<title>Server Overview</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/serveroverview.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
- </section>
- </section>
- <section id="JBossInstances">
- <?dbhtml filename="JBossInstances.html"?>
- <title>How to Manage JBoss AS Instances in RHDS</title>
- <para>Although Red Hat Developer Studio works closely with <property>JBoss
EAP 4.2</property> we do not ultimately tie you to any particular server for
deployment. There are some servers that Studio supports directly (via the bundled Eclipse
WTP plug-ins). Suppose you want to deploy the application to <property>JBoss 4.2.1
server</property>. First of all you need to install it.</para>
- <section id="JBossInstalling">
- <?dbhtml filename="JBossInstalling.html"?>
- <title>JBoss AS Installation</title>
- <itemizedlist>
-<listitem><para>Download the binary package of <property>JBoss
4.2.1</property> and save it on your computer: <ulink
url="http://labs.jboss.com/jbossas/downloads">http://labs.jb...
-</itemizedlist>
- <para>It does not matter where on your system you install JBoss
server.</para>
-
- <note>
- <title>Note:</title>
- <para>The installation of JBoss server into a directory that has a name
containing spaces provokes problems in some situations with Sun-based VMs. Try to avoid
using installation folders that have spaces in their names.</para>
- </note>
-
- <para>There is no requirement for root access to run JBoss Server on UNIX/Linux
systems because none of the default ports are within the 0-1023 privileged port
range.</para>
-<itemizedlist continuation="continues">
-<listitem><para>After you have the binary archive you want to install, use
the JDK jar tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip archive
contents into a location of your choice. The jboss-4.2.1.tgz archive is a gzipped tar
file that requires a gnutar compatible tar which can handle the long pathnames in the
archive. The extraction process will create a jboss-4.2.1 directory.
</para></listitem>
-</itemizedlist>
-</section>
-
- <section id="AddingJBossServer">
- <?dbhtml filename="AddingJBossServer.html"?>
- <title>Adding and configuring JBoss server</title>
- <para>Now we should add just installed server into server manager in Red Hat
Developer Studio.</para>
- <itemizedlist>
- <listitem><para>Open the JBoss Server View by selecting
<emphasis><property>Window > Show View > Other > Server
> JBoss Server View</property></emphasis>. You will see JBoss Server
view.</para></listitem>
- <listitem><para>Right click anywhere in this view and select
<emphasis><property>New
Server</property></emphasis>.</para></listitem>
- <listitem><para>Select <emphasis><property>JBoss, a
division of Red Hat > JBoss v4.2</property></emphasis> and click the
<emphasis><property>Installed Runtimes</property></emphasis>
button to select a new installed runtime.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Selecting Server Type</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/ManageJBossAS/servertype.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
- <itemizedlist continuation="continues">
- <listitem><para>Click
<emphasis><property>Add</property></emphasis> button to add a new
jboss runtime.</para></listitem>
- <listitem><para>Select <emphasis><property>JBoss, a
division of Red Hat > JBoss v4.2</property></emphasis> and press
<emphasis><property>Next</property></emphasis>.</para></listitem>
- </itemizedlist>
-
- <figure>
-<title>Installed Runtimes</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/jbossruntime2.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
-
-
-<itemizedlist continuation="continues">
-<listitem><para>In the next step make Red Hat Developer Studio to know where
you have installed the server and define JRE.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Defining JBoss Runtime</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/ManageJBossAS/jbossruntime.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<note>
- <title>Note:</title>
- <para>When adding a new server you will need to specify what JRE to use. It is
important to set this value to a full JDK, not JRE. Again, you need a full JDK to run Web
applications, JRE will not be enough.</para>
-</note>
-<itemizedlist continuation="continues">
- <listitem><para>In the following window leave all settings default or
give your name to a new jboss server and press
<emphasis><property>Finish</property></emphasis>.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Adding New Runtime</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/addingjbossserver.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>A new runtime will now appear in the
<emphasis><property>Preferences > Server > Installed
Runtimes</property></emphasis> dialog.</para>
-<figure>
-<title>Runtime is Added</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/ManageJBossAS/addedruntime.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
-<itemizedlist continuation="continues">
- <listitem><para>Click
<emphasis><property>OK</property></emphasis>. Then select a new
added runtime in Server runtime drop down list and click
<emphasis><property>Next</property></emphasis> button
twice.</para></listitem>
-</itemizedlist>
-<figure>
-<title>Choosing Runtime</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/choosingruntime.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<itemizedlist>
- <listitem><para>In the next dialog verify a
<property>JBoss</property> runtime information and if something is unfair go
back and correct it.</para></listitem>
- </itemizedlist>
- <figure>
-<title>Configuring Projects</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/choosingruntime23.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <itemizedlist>
- <listitem><para>In the last wizard's dialog modify the
projects that are configured on the server and click
<emphasis><property>Finish</property></emphasis>.</para></listitem>
- </itemizedlist>
- <figure>
-<title>Configuring Projects</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/configuringprojects.png"/>
- </imageobject>
-</mediaobject>
-</figure>
- <para>A new JBoss server should now appear in JBoss Server View.</para>
-<figure>
-<title>New JBoss Server</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/ManageJBossAS/newjbossserver.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
- </section>
- </section>
-</chapter>
Added: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml
(rev 0)
+++
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml 2007-11-13
12:36:45 UTC (rev 4872)
@@ -0,0 +1,456 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="first_seam" xreflabel="first_seam">
+ <?dbhtml filename="first_seam.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Write Your First Seam Web Application</title>
+
+ <para>The Red Hat Developer Studio provides sophisticated tools for enterprise
applications. With the Red Hat Developer Studio, you can get started very quickly with a
web prototype, and then scale up your application to include enterprise features (e.g.,
business processes, web services, etc.) using the same developer tools. It is a
"scalable" RAD (Rapid Application Development) tool.</para>
+
+ <para>A core element that makes the Red Hat Developer Studio
"scalable" is the JBoss <property>Seam framework</property>.
Seam is a fully featured application framework on top of Java EE 5. It is also one of the
most popular enterprise Java framework today. Seam deeply integrates many other
standard-based or open source frameworks (e.g., JSF, EJB3, JMS, Web Services, jBPM, JBoss
Rules, Ajax4jsf, RichFaces, Facelets, Spring, iText, Quartz, TestNG, etc.), and provides a
single programming model for developers to "drive" those underlying
frameworks via simple annotated POJOs (Plain Old Java Objects). It makes life easier for
developers to tackle complex enterprise applications with many component
frameworks.</para>
+
+ <para>In this chapter, we will cover how to build a simple Seam web application
in minutes with the Red Hat Developer Studio.</para>
+
+ <section>
+ <title>Create a Seam Project</title>
+
+ <para>To create a new web application in <property>Seam</property>,
select <emphasis><property>New > Project ... > Seam >
Seam Web Project</property></emphasis>. You will be prompted to enter a name
and a location directory for your new project. You will also be asked to choose a JBoss AS
server to deploy the project. You must choose the JBoss AS 4.2.0 instance we had defined
in the JBoss AS Server manager view.</para>
+
+ <figure>
+ <title>Create a Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next, you will be asked to select the "features" you
want to use in your project. This allows Red Hat Developer Studio to setup the appropriate
tooling for your project. Since JBoss Seam integrates all popular Java EE frameworks, you
can select any combination of technologies from the list. Here, for this project, we will
select Dynamic Web Module, Java, Java Persistence (JPA), JavaServer Faces (JSF), and Seam
Facet for a typical database-driven web application.</para>
+
+ <figure>
+ <title>Select Toolings for the Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>A dynamic web application contains both web pages and Java code. The
wizard will ask you where you want to put those files. You can just leave the default
values.</para>
+
+ <figure>
+ <title>Select Directory Names for Web Pages and Java Files</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>We will use a default connection provided by RHDS.</para>
+ <orderedlist>
+ <listitem><para>Click
<emphasis><property>Next</property></emphasis> in the dialog
<property>JPA Facet</property></para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Select Provider for JPA JARs</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </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 <emphasis><property>Server Supplied
JSF Implementation</property></emphasis>. We will use JSF implementation that
comes with JBoss server</para></listitem>
+ <listitem><para>Click
<emphasis><property>Next</property></emphasis></para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Define JSF Implementation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We will also use a default Hibernate Dialect -
<emphasis>org.hibernate.dialect.HSQLDialect</emphasis> and deploy as a
<emphasis>war</emphasis> archive.</para>
+
+ <para>The project setup wizard also asks you to configure how Seam generates
code for the project. The Seam Home Folder should point to a valid Seam distribution. By
default, it is set to the Seam distribution bundled in your Red Hat Developer Studio tool.
If you need another one choose it from the drop down list box:</para>
+
+ <figure>
+ <title>Enter Java Packages for Generated Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+<para>If in this list there is no Seam runtime you want to use add it through
<emphasis><property>Window > Preferences > JBoss Tools >
Web > Seam</property></emphasis> or just click
<emphasis><property>Add</property></emphasis> button near the Seam
Runtime list:</para>
+<figure>
+ <title>Add New Seam Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+<para>For the deployment format, choose WAR deployment if you want to use POJOs for
UI event handling and business logic; choose EAR deployment if you want to EJB3 beans for
added features. In most web applications, the WAR deployment option would suffice. You
should also enter Java packages for the entity beans (for database mapping) and session
beans (for action handlers). All generated code will be placed in those packages.
</para>
+
+ <para>Click on
<emphasis><property>Finish</property></emphasis> to generate a
project. The generated project contains all the necessary library JARs, XML configuration
files, the ANT build script, as well as simple XHTML web pages and Java classes for the
skeleton web application. The project will be shown in Project Explorer as well as in
<emphasis><property>Seam Components</property></emphasis> view. If
Seam Components view is not open select <emphasis><property>Window >
Show View > Seam Components</property></emphasis>.</para>
+ <figure>
+ <title>Seam Components View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can hide unused Seam components from this view.</para>
+ <itemizedlist>
+ <listitem><para>Click the button
<emphasis><property>Menu</property></emphasis> on the top of the
view (down-pointing arrow)</para></listitem>
+ <listitem><para>Choose <emphasis><property>Customize
View..</property></emphasis></para></listitem>
+ <listitem><para>In the dialog <emphasis><property>Available
Customization</property></emphasis> check the filter you want to apply under
the <emphasis><property>Filters</property></emphasis>
tab</para></listitem>
+ </itemizedlist>
+ <figure>
+ <title>Seam Components Filtering</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Build and Deploy the Seam Application</title>
+
+ <para>Once the application is generated, you can use the "Run on
server" menu to build and deploy it into the JBoss AS runtime associated with the
project. All you need is to start JBoss AS in the server manager, and load the browser at
URL
http://localhost:8080/MySeamProj/. You should see the following web
page.</para>
+
+ <figure>
+ <title>The Generated Application in Action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To make simple changes to the page, you just need to double click on the
<emphasis><property>WebContent/home.xhtml
file</property></emphasis> and edit it in the visual editor. Notice that the
visual editor lets you both the XHTML code and the rendered page. The rendered view is
designed to make it easy to find stuff in a complex XHTML page.</para>
+
+ <figure>
+ <title>Making Changes in the Visual Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once you finished editing, save the file
(<emphasis><property>File > Save</property></emphasis>),
re-deploy the application, and reload the browser to see the changes.</para>
+
+ <figure>
+ <title>The Front Page is Changed</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- Not yet ...
+ <para>Notice that we do not need to re-build and re-deploy the application.
Just save the edited page and reload the browser.</para>
+ -->
+
+ </section>
+
+ <section>
+ <title>Add a Web Page and an Action</title>
+
+ <para>To add a new page and related UI action to the project, use the
<emphasis><property>New > Other ... > Seam > Seam
Form</property></emphasis> wizard. You are prompted to enter the name of the
web page, the name for the Seam component that handles UI actions from the page, and UI
action method name.</para>
+
+ <figure>
+ <title>New Form for the Application</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizard generate a web page with a single text input field and an
action button. Notice that the generated page uses
<emphasis>layout/template.xhtml</emphasis> as a template. The template page
provides the page header, footer, side menu, and CSS styles (see the template.xhtml for
more details). The Simplepage.xhtml is assembled into the template when the
Simplepage.seam URL is loaded.</para>
+
+ <programlisting role="XML"><![CDATA[
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
xmlns:s="http://jboss.com/products/seam/taglib"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h1>Simplepage</h1>
+ <p>Generated form page</p>
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <h:form id="simpleAction">
+ <div class="dialog">
+ <s:validateAll>
+ <div class="prop">
+ <span class="name">Value</span>
+ <span class="value">
+ <s:decorate>
+ <h:inputText id="value" required="true"
+ value="#{simpleAction.value}"/>
+ </s:decorate>
+ </span>
+ </div>
+ </s:validateAll>
+ </div>
+ <div class="actionButtons">
+ <h:commandButton id="hello" value="hello"
+ action="#{simpleAction.hello}"/>
+ </div>
+ </h:form>
+
+</ui:define>
+
+</ui:composition>
+]]></programlisting>
+ <figure>
+ <title>Generated Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <emphasis>#{simpleAction.value}</emphasis> notation on
the web page maps to the "value" property in the backend component named
"simpleAction", and the
<emphasis>#{simpleAction.hello}</emphasis> notation indicates that the
<emphasis><property>hello()</property></emphasis> method is called
when the button is clicked on. Here is the "simpleAction" named backend
Seam component generated by the wizard.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+@Name("simpleAction")
+public class SimpleAction {
+
+ @Logger private Log log;
+
+ @In
+ FacesMessages facesMessages;
+
+ private String value;
+
+ //seam-gen method
+ public String hello()
+ {
+ //implement your business logic here
+ log.info("simpleAction.echo() action called with:
#{simpleAction.value}");
+ facesMessages.add("echo #{simpleAction.value}");
+ return "success";
+ }
+
+ //add additional action methods
+
+ @Length(max=10)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
+]]></programlisting>
+
+ <para>Load the Simplepage.seam in the web browser. Type something in the text
field and click on the "hello" button. A JSF message containing the
input string is created by the
<emphasis><property>SimpleAction.hello()</property></emphasis>
method. The message is displayed on the page via the <emphasis
role="bold"><property><h:messages></property></emphasis>
tag.</para>
+
+ </section>
+
+ <section>
+ <title>Input Validation</title>
+
+ <para>Notice that in the generated SimpleAction class, there is a
<emphasis>@Length</emphasis> annotation to validate the input when the input
string is bound to <emphasis>#{simpleAction.value}</emphasis>. To see how this
works, enter a text string longer than 10 chars and click on the button. This is what you
should see.</para>
+
+ <figure>
+ <title>The Input Validation in Action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_15.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Seam supports many different input validation annotations. To see an
example, you can replace the <emphasis>@Length(max=10)</emphasis> annotation
with the following. It would require the input string to have a first name and last name
separated by a space. If the validation fails, the web page would print the customized
error message.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+@NotNull
+(a)Pattern(regex="^[a-zA-Z.-]+ [a-zA-Z.-]+",
+ message="Need a firstname and a lastname")
+public String getValue()
+{
+ return value;
+}
+]]></programlisting>
+
+ <para>Save the Java file, deploy the application, and reload the browser to see
the new validation scheme in action.</para>
+
+ <figure>
+ <title>More Input Validation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Add a new UI Component</title>
+
+ <para>Now, let's add a little more logic to the application. We will
add a new boolean property to the action component. If it is set to true, the action would
capitalize the input string and display it on the web page. The following code in the
SimpleAction class implements the logic.</para>
+
+ <programlisting
role="JAVA"><![CDATA[@Name("simpleAction")
+public class SimpleAction {
+
+ private boolean convertToCap;
+
+ public boolean getConvertToCap () { return convertToCap; }
+ public void setConvertToCap (boolean b) { convertToCap = b; }
+
+ public String hello()
+ {
+ if (convertToCap) {
+ value = value.toUpperCase ();
+ }
+ return null;
+ }
+ ... ...
+}
+]]></programlisting>
+
+ <para>Next, on the web page, add the following line to display the value
property on the simpleAction component. Notice that code completion is supported for the
JSF EL expression.</para>
+
+ <programlisting role="XML"><![CDATA[<p><b>Hello,
#{simpleAction.value}</b></p>
+]]></programlisting>
+
+ <para>Finally, on the web page, we add a boolean selection box component. It is
bound to the
<emphasis><property>convertToCap</property></emphasis> property on
the backend component.</para>
+
+ <programlisting role="XML"><![CDATA[<h:selectBooleanCheckbox
title="convertToCap"
+ value="#{simpleAction.convertToCap}" />
+Capitalize the input?
+]]></programlisting>
+
+ <para>Deploy the application and see it in action now.</para>
+
+ <figure>
+ <title>Add UI Components and Business Logic</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Add Security to the Application</title>
+
+ <para>You have probably noticed that the web page template has a login link at
the top of the page. You can use the Seam security framework to secure access to any web
page or web action. You can implement the login logic in the
<emphasis>checkLoggedIn</emphasis> method. In the following example, we just
use hardcoded username and password. But you can easily change it to use database, LDAP or
any other means.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+]]></programlisting>
+
+ <para>Then, on the action method, you can use the
<emphasis>@AroundInvoke</emphasis> annotation to specify that it is only
invoked by authenticated users.</para>
+
+ <programlisting role="JAVA"><![CDATA[public class
LoggedInInterceptor
+ {
+ @AroundInvoke
+ public Object checkLoggedIn(InvocationContext invocation) throws Exception
+ {
+ boolean isLoggedIn = Contexts.getSessionContext().get("loggedIn")!=null;
+ if (isLoggedIn) {
+ //the user is already logged in
+ return invocation.proceed();
+ }
+ else {
+ //the user is not logged in, fwd to login page
+ return "login";
+ }
+ }
+}
+]]></programlisting>
+
+ <para>Now, re-deploy the application and try the action button. The application
redirects to the <emphasis>login</emphasis> page asking for login credentials.
The method is invoked after you successfully logged in.</para>
+
+ <figure>
+ <title>Access Control for Action Methods</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam_18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We can also secure web pages. You can edit the
<emphasis>Authenticator.java</emphasis> file to put an access constraint on
the login page.</para>
+
+ <programlisting
role="JAVA"><![CDATA[package.org.domain.MySeamProj.session;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.identity;
+
+ @Name ("authenticator")
+ public class Authenticator
+ {
+ @Logger Log log;
+ @In Identity identity;
+
+ public boolean authenticate()
+ {
+ log.info("authenticating #0", identity.getUserName());
+ //write your authentication logic here,
+ //return true if the authentication was
+ //successful, false otherwise
+ identity.addRole("admin");
+ return true;
+ }
+ }
+]]></programlisting>
+
+ <para>You can try to load the
http://localhost:8080/MySeamProj/ URL in the
browser and it will redirect to ask for login.</para>
+
+ </section>
+
+
+<section id="OtherRelevantResourcesOnTheTopic2">
+<?dbhtml filename="OtherRelevantResourcesOnTheTopic2.html"?>
+<title>Other relevant resources on the topic</title>
+<para>Seam on JBoss: <ulink
url="http://www.jboss.com/products/seam">Seam
Framework</ulink></para>
+
+<para>Ten Good Reasons to use Seam: <ulink
url="http://www.jboss.com/products/seam/whyseam">Why
Seam</ulink></para>
+<para>Getting Started: <ulink
url="http://labs.jboss.com/jbossseam/gettingstarted">Getting Started with
JBoss Seam</ulink></para>
+<para>Wiki: <ulink
url="http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam">JBoss
Wiki</ulink></para>
+<para>FAQ: <ulink
url="http://labs.jboss.com/jbossseam/faq/index.html">JBoss Seam
FAQ</ulink></para>
+<para>Downloads: <ulink
url="http://labs.jboss.com/jbossseam/download">JBoss Seam
Downloads</ulink></para>
+<para>Jira: <ulink
url="http://jira.jboss.org/jira/browse/JBSEAM">Jira issue
tracker</ulink></para>
+<para>Rules Framework: <ulink
url="http://www.jboss.com/products/rules">JBoss
Rules</ulink></para>
+<para>Seam Tools - New and Noteworthy: <ulink
url="http://fisheye.jboss.org/browse/~raw,r=3993/JBossTools/trunk/do...
new and noteworthy</ulink></para>
+
+</section>
+</chapter>
Added:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
---
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
(rev 0)
+++
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2007-11-13
12:36:45 UTC (rev 4872)
@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="getting_started" xreflabel="getting_started">
+ <?dbhtml filename="getting_started.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Getting Started with Red Hat Developer Studio</title>
+ <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 fails 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>
+ <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've installed.</para></listitem>
+ <listitem><para>Create an environment variable that points to the JDK
installation directory and call it JAVA_HOME. Add
<emphasis><property>$JAVA_HOME/bin</property></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>
+ <programlisting><![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>
+</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.
+ You only need to run "alternative" as a safe guard for the right
JVM.</para>
+ </note>
+
+ <para>Set this variable for your account doing the installation and also for the
user account that will run the server.</para>
+ <itemizedlist>
+ <listitem><para>If you have more than one version of JVM installed on
your machine, make sure you are using the JDK 1.5 installation as the default java and
javac.
+ You can do this using the alternatives system. The alternatives system allows
different versions of Java from different sources to co-exist on your
system.</para></listitem>
+ </itemizedlist>
+ <section id="SelectAlternativesforJava">
+ <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
+ <itemizedlist>
+ <listitem><para>As a root user, 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
+There are 2 programs that provide 'java'.
+Selection Command
+-----------------------------------------------
+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
+Enter to keep the current selection[+], or type selection
number:]]></programlisting>
+ <para>Make sure the Sun version [jre-1.5.0-sun in this case] is selected
(marked with a '+' in the output), or select it by entering its number
as prompted.</para>
+ <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
+There is 1 program that provides 'javac'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
+Enter to keep the current selection[+], or type selection number:
+
+[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
+There is 1 program that provide 'java_sdk_1.5.0'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun
+Enter to keep the current selection[+], or type selection
number:]]></programlisting>
+ <para>You should verify that java, javac and java_sdk_1.5.0 all point to the
same manufacturer and version.</para>
+ <note>
+ <title>Note:</title>
+ <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>
+ </itemizedlist>
+ <programlisting><![CDATA[[root@vsr ~]$ java -version
+java version "1.5.0_11"
+Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
+Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode,
sharing)]]></programlisting>
+</section>
+
+ </section>
+ <section id="InstallJDK50onWindows">
+ <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>
+ <listitem><para>Create an environment variable called JAVA_HOME that
points to the JDK installation directory, for example:
+<para><emphasis>C:\Program
Files\Java\jdk1.5.0_11\</emphasis></para></para></listitem>
+ </itemizedlist>
+
+ <para>In order to run java from the command line, add the
<emphasis>jre\bin</emphasis> directory to your path, for
example:</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 (System), select the
Advanced Tab, and click on the Environment Variables button.</para>
+ </section>
+ </section>
+ <section id="InstallingRHDS">
+ <?dbhtml filename="InstallingRHDS.html"?>
+ <title>Red Hat Developer Studio Installation</title>
+ <section id="Instfromdownver">
+ <title>Installing from the downloaded version</title>
+ <para>RHDS comes with a simple installer, bundled with tested/pre-configured
versions of Eclipse, Webtools, JBossEAP, Seam, 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 in console:</para>
+ <programlisting role="JAVA"><![CDATA[java -jar
rhdevstudio-linux-gtk-1.0.0.beta2.jar
+]]></programlisting></listitem>
+ <listitem><para>Follow the instructions presented by the installation
wizard</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Red Hat Developer Studio Installation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Provide the installation
path</para></listitem>
+ <listitem><para>Select Java VM</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Selecting <emphasis><property>Default Java
VM</property></emphasis> you set default Java VM of your system (to verify
your Java environment, type "java -version" in console).</para>
+ <para>Selecting <emphasis><property>Specific Java
VM</property></emphasis> you can provide the path to non-default Java
VM.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Red Hat Developer Studio needs Java 5 and doesn't work with gij
Java.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem><para>Installation process includes JBoss Enterprise
Application Platform. Select
<emphasis><property>Yes</property></emphasis> to use it in Red Hat
Developer Studio.</para></listitem>
+ </itemizedlist>
+
+<para></para>
+
+ <figure>
+ <title>JBoss Enterprise Application Platform Installing</title>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3.png"/>
+ </imageobject>
+ </figure>
+ <para></para>
+ <note>
+ <title>Note:</title>
+ <para>The installer installs JBoss Enterprise Application Platform for
running your applications if you select this option during the installation process.
+ If you want to use a different server than ours, you can change the setting in Red
Hat Developer Studio.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem><para>Check your installation paths and see the components
will be installed. Click
<emphasis><property>Next</property></emphasis> to start
installation.</para></listitem>
+ </itemizedlist>
+
+ <para></para>
+
+ <figure>
+ <title>Summary Information</title>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_4.png"/>
+ </imageobject>
+ </figure>
+
+ </section>
+ </section>
+ <section id="Welcome">
+ <title>Welcome to Red Hat Developer Studio</title>
+ <para>The welcome page is the first page you see when you first launch Red Hat
Developer Studio. </para>
+
+ <figure>
+ <title>Welcome to Red Hat Developer Studio</title>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_5.png"/>
+ </imageobject>
+ </figure>
+
+ <para>With the help of its page you will be able:</para>
+ <itemizedlist>
+ <listitem><para>to get quick access to Getting Started Documentation
(guides, tutorials and viewlets)</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Getting Started Documentation</title>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_6.png"/>
+ </imageobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>to create new Seam, jBPM Process, JSF or Struts projects
using RHDS wizards</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Create New...</title>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_7.png"/>
+ </imageobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>to get short description of perspectives that RHDS offers
for more productive development</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Perspectives</title>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_8.png"/>
+ </imageobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>to visit Red Hat Developer Studio web
resources.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Web Resources</title>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_9.png"/>
+ </imageobject>
+ </figure>
+
+ <para>Start work with Red Hat Developer Studio by clicking on
<emphasis><property>Workbench</property></emphasis> button or
simply close the welcome page.</para>
+
+ </section>
+
+ <section id="Upgrading">
+ <?dbhtml filename="Upgrading.html"?>
+ <title>Upgrading</title>
+ <para>To upgrade, just uninstall your current version and install the new
one.</para>
+ </section>
+ <section id="Uninstalling">
+ <?dbhtml filename="Uninstalling.html"?>
+ <title>Uninstalling</title>
+ <itemizedlist>
+ <listitem>Make sure Red Hat Developer Studio is not running</listitem>
+ <listitem>Uninstall your current version of Red Hat Developer Studio by running
uninstaller</listitem>
+</itemizedlist>
+ </section>
+ <section id="Support">
+ <?dbhtml filename="Support.html"?>
+ <title>Support</title>
+ <para>If you have comments or questions, you can discuss them at our
+ <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Hat Developer Studio Forum</ulink>.</para>
+ <para>When writing to the forum for questions, please include the following
information:</para>
+ <orderedlist>
+ <listitem><para>Red Hat Developer Studio
version</para></listitem>
+ <listitem><para>Exact error message</para></listitem>
+ <listitem><para>Steps to reproduce the
issue</para></listitem>
+ </orderedlist>
+ </section>
+<section id="FAQ">
+ <?dbhtml filename="FAQ.html"?>
+ <title>FAQ</title>
+ <para>For easy reference to Red Hat Developer Studio related questions, our FAQ
provides answers to our most "popular" questions.
+ The sections of questions are organized by type. </para>
+<!-- <section id="Before_Installing">
+ <title>Before Installing, Tutorials, Examples, Readme Files</title>
+ <para><emphasis role="bold">I'm looking for examples, do you
have any?</emphasis></para>
+ <para>Yes, simply go to our <ulink
url="http://exadel.com/web/portal/products/Tutorials">tutorials
page</ulink></para>
+ <para><emphasis role="bold">Where can I find the Red Hat
Developer Studio readme file?</emphasis></para>
+ <para>It's located at this page: <ulink
url="http://www.exadel.com/web/portal/products/ReleaseNotes">...
Notes</ulink></para>
+ <para><emphasis role="bold">Where can I find some documentation
for Red Hat Developer Studio?</emphasis></para>
+ <para>Try these resources: <ulink
url="http://www.exadel.com/exadelstudio/help/">User
Guide</ulink></para>
+ <para><emphasis role="bold">What version of Eclipse does Red Hat
Developer Studio support?</emphasis></para>
+ <para>Red Hat Developer Studio works with Eclipse 3.3</para>
+ </section> -->
+ <!--<section id="Downloading">
+ <title>Downloading</title>
+ <para><emphasis role="bold">Where can I download a copy of Red
Hat Developer Studio?</emphasis></para>
+ <para>Go to <ulink
url="http://www.redhat.com/developers/rhds/index.html">Download
Page</ulink></para>
+ </section>-->
+ <section id="Installation_Issues">
+ <title>Installation Issues</title>
+ <para><emphasis role="bold">Visual Editor does not start under
Linux</emphasis></para>
+ <para>Linux users may need to do the following to get the visual editor to work
correctly
+on their machines.</para>
+
+<orderedlist>
+<listitem>On Red Hat based Linux distributions install the xpLib.i386
package</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,
<emphasis><workspace>\.metadata\.log</emphasis></listitem>
+<listitem>Start Eclipse with the -debug option:
+<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>If you want to use a different JBoss server installation, after Red Hat
Developer Studio is installed open Servers View (select
<emphasis><property>Window > Show View > Others > Server
> Servers</property></emphasis>), then right click on this
<emphasis><property>view > New >
Server</property></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>
+ <section id="Importing_Projects">
+ <title>Importing Projects</title>
+ <para><emphasis role="bold">I have an existing Struts or JSF
project. Can I open the project in RHDS?</emphasis></para>
+ <para>Yes. From main menu select <emphasis><property>File >
Import > Other > JSF Project (or Struts
Project)</property></emphasis> and follow wizards steps.</para>
+ <para><emphasis role="bold">Can I import a .war
file?</emphasis></para>
+ <para>Yes. Select <emphasis><property>File > Import >
Web > WAR file</property></emphasis>, then follow importing
steps.</para>
+ </section>
+ <section id="Troubleshooting">
+ <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>
+ <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>
+ <para><emphasis role="bold">I see the Oracle ADF Faces component
library tags in the Red Hat Palette, but I can't seem to find the libraries for
ADF. How do I use this component library with RHDS?</emphasis></para>
+ <para>See <ulink
url="http://www.redhat.com/developers/rhds/JSFTools/JavaServerFacesS...
Support for the Oracle ADF Components Library</ulink> in the RHDS User
Guide.</para>
+ </section>
+</section>
+
+<section id="OtherRelevantResourcesOnTheTopic33">
+<?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
+<title>Other relevant resources on the topic</title>
+<para>RHDS on JBoss: <ulink
url="http://labs.jboss.com/rhdevstudio/">Red Hat Developer
Studio</ulink></para>
+<para>Forum: <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Forum</ulink></para>
+<para>Download: <ulink
url="http://www.redhat.com/developers/rhds/index.html">RHDS
Download</ulink></para>
+</section>
+</chapter>
+
Added: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
(rev 0)
+++
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml 2007-11-13
12:36:45 UTC (rev 4872)
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="manage" xreflabel="manage">
+ <?dbhtml filename="manage.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Manage JBoss AS from Red Hat Developer Studio</title>
+ <para>Red Hat Developer Studio ships with <property>JBoss EAP
v.4.2</property> bundled. When you followed the default installation of Red Hat
Developer Studio, you should already have a JBoss 4.2 server installed and defined. To run
JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although you may be
able to start the server with it.</para>
+ <section id="JBossbundled">
+ <?dbhtml filename="JBossbundled.html"?>
+ <title>How to Manage the JBoss AS Bundled in RHDS</title>
+ <para></para>
+ <section id="StartingServer">
+ <?dbhtml filename="StartingServer.html"?>
+ <title>Starting JBoss server</title>
+ <para>Starting <property>JBoss server</property> is quite simple. Red
Hat Developer Studio allows you to control its behaviour with the help of a special
toolbar: where you could start it in a regular or debug mode, stop it or restart
it.</para>
+ <itemizedlist>
+ <listitem><para>To launch the server click the green-with-white-arrow
icon on the <property>JBoss Server View </property>or right click server name
in this view and select
<emphasis><property>Start</property></emphasis>. If this view is
not open, select <emphasis><property>Window > Show View > Other
> Server > JBoss Server
View</property></emphasis></para></listitem>
+ </itemizedlist>
+ <figure>
+<title>Starting from Icon</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_1.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+<figure>
+<title>Starting from JBoss Server View</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_2.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+<para>While launching, server output is written to the Console view:</para>
+
+<figure>
+<title>Console Output</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_3.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>When the server is started you should see
<emphasis><property>Started</property></emphasis> right to its
name in <property>JBoss Server View</property> (column
"Status").</para>
+<figure>
+<title>Server is Started</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_4.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>To see event log after the server is started, expand
<property>Event Log</property> branch beneath JBoss Server View:</para>
+<figure>
+<title>Event Log</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_5.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ </section>
+ <section id="StoppingJBoss">
+ <?dbhtml filename="StoppingJBoss.html"?>
+ <title>Stopping JBoss Server</title>
+ <para>To stop the server, click the
<emphasis><property>Stop</property></emphasis> icon in JBoss
Server View or right click the server name and press
<emphasis><property>Stop</property></emphasis>.</para>
+ <figure>
+<title>Stopping Server</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_6.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>When the server is stopped you will see
<emphasis><property>Stopped</property></emphasis> next to its name
in the Status column.</para>
+ </section>
+ <section id="ServerPreferences">
+ <?dbhtml filename="ServerPreferences.html"?>
+ <title>Server Container Preferences</title>
+ <para>You can control how Red Hat Developer Studio interacts with servlet
containers in Preferences. Select <emphasis><property>Window >
Preferences > JBoss Tools > JBoss Servers</property></emphasis>
and switch to the desired server:</para>
+ <figure>
+<title>Server Preferences</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_7.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>Also you can double click the server name in JBoss Server View and open
an overview of the server. Here you can specify some common settings: host name, server
name, runtime and so on.</para>
+<figure>
+<title>Server Overview</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_8.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+ </section>
+ </section>
+ <section id="JBossInstances">
+ <?dbhtml filename="JBossInstances.html"?>
+ <title>How to Manage JBoss AS Instances in RHDS</title>
+ <para>Although Red Hat Developer Studio works closely with <property>JBoss
EAP 4.2</property> we do not ultimately tie you to any particular server for
deployment. There are some servers that Studio supports directly (via the bundled Eclipse
WTP plug-ins). Suppose you want to deploy the application to <property>JBoss 4.2.1
server</property>. First of all you need to install it.</para>
+ <section id="JBossInstalling">
+ <?dbhtml filename="JBossInstalling.html"?>
+ <title>JBoss AS Installation</title>
+ <itemizedlist>
+<listitem><para>Download the binary package of <property>JBoss
4.2.1</property> and save it on your computer: <ulink
url="http://labs.jboss.com/jbossas/downloads">http://labs.jb...
+</itemizedlist>
+ <para>It does not matter where on your system you install JBoss
server.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The installation of JBoss server into a directory that has a name
containing spaces provokes problems in some situations with Sun-based VMs. Try to avoid
using installation folders that have spaces in their names.</para>
+ </note>
+
+ <para>There is no requirement for root access to run JBoss Server on UNIX/Linux
systems because none of the default ports are within the 0-1023 privileged port
range.</para>
+<itemizedlist continuation="continues">
+<listitem><para>After you have the binary archive you want to install, use
the JDK jar tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip archive
contents into a location of your choice. The jboss-4.2.1.tgz archive is a gzipped tar
file that requires a gnutar compatible tar which can handle the long pathnames in the
archive. The extraction process will create a jboss-4.2.1 directory.
</para></listitem>
+</itemizedlist>
+</section>
+
+ <section id="AddingJBossServer">
+ <?dbhtml filename="AddingJBossServer.html"?>
+ <title>Adding and configuring JBoss server</title>
+ <para>Now we should add just installed server into server manager in Red Hat
Developer Studio.</para>
+ <itemizedlist>
+ <listitem><para>Open the JBoss Server View by selecting
<emphasis><property>Window > Show View > Other > Server
> JBoss Server View</property></emphasis>. You will see JBoss Server
view.</para></listitem>
+ <listitem><para>Right click anywhere in this view and select
<emphasis><property>New
Server</property></emphasis>.</para></listitem>
+ <listitem><para>Select <emphasis><property>JBoss, a
division of Red Hat > JBoss v4.2</property></emphasis> and click the
<emphasis><property>Installed Runtimes</property></emphasis>
button to select a new installed runtime.</para></listitem>
+</itemizedlist>
+<figure>
+<title>Selecting Server Type</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_9.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+ <itemizedlist continuation="continues">
+ <listitem><para>Click
<emphasis><property>Add</property></emphasis> button to add a new
jboss runtime.</para></listitem>
+ <listitem><para>Select <emphasis><property>JBoss, a
division of Red Hat > JBoss v4.2</property></emphasis> and press
<emphasis><property>Next</property></emphasis>.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+<title>Installed Runtimes</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_10.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+
+
+<itemizedlist continuation="continues">
+<listitem><para>In the next step make Red Hat Developer Studio to know where
you have installed the server and define JRE.</para></listitem>
+</itemizedlist>
+<figure>
+<title>Defining JBoss Runtime</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_11.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+<note>
+ <title>Note:</title>
+ <para>When adding a new server you will need to specify what JRE to use. It is
important to set this value to a full JDK, not JRE. Again, you need a full JDK to run Web
applications, JRE will not be enough.</para>
+</note>
+<itemizedlist continuation="continues">
+ <listitem><para>In the following window leave all settings default or
give your name to a new jboss server and press
<emphasis><property>Finish</property></emphasis>.</para></listitem>
+</itemizedlist>
+<figure>
+<title>Adding New Runtime</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_12.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>A new runtime will now appear in the
<emphasis><property>Preferences > Server > Installed
Runtimes</property></emphasis> dialog.</para>
+<figure>
+<title>Runtime is Added</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_13.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+<itemizedlist continuation="continues">
+ <listitem><para>Click
<emphasis><property>OK</property></emphasis>. Then select a new
added runtime in Server runtime drop down list and click
<emphasis><property>Next</property></emphasis> button
twice.</para></listitem>
+</itemizedlist>
+<figure>
+<title>Choosing Runtime</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_14.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+<itemizedlist>
+ <listitem><para>In the next dialog verify a
<property>JBoss</property> runtime information and if something is unfair go
back and correct it.</para></listitem>
+ </itemizedlist>
+ <figure>
+<title>Configuring Projects</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_15.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <itemizedlist>
+ <listitem><para>In the last wizard's dialog modify the
projects that are configured on the server and click
<emphasis><property>Finish</property></emphasis>.</para></listitem>
+ </itemizedlist>
+ <figure>
+<title>Configuring Projects</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_16.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>A new JBoss server should now appear in JBoss Server View.</para>
+<figure>
+<title>New JBoss Server</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_17.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+
+ </section>
+ </section>
+</chapter>