From jbosstools-commits at lists.jboss.org Thu Mar 4 08:08:10 2010 Content-Type: multipart/mixed; boundary="===============7229674116670291215==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r20653 - in branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide: en and 3 other directories. Date: Thu, 04 Mar 2010 08:08:10 -0500 Message-ID: <201003041308.o24D8AGj020899@svn01.web.mwc.hst.phx2.redhat.com> --===============7229674116670291215== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ochikvina Date: 2010-03-04 08:08:09 -0500 (Thu, 04 Mar 2010) New Revision: 20653 Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_4a.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_4b.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_4c.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_4d.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_4e.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_4f.png Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/first_seam/first_seam4.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/first_seam/first_seam5.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/im= ages/getting_started/getting_started_1.png branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/ma= ster_output.xml branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/mo= dules/getting_started.xml branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/pom.x= ml Log:

https://jira.jboss.org/jira/browse/JBDS-1107 -Updated docs source files = here with the ones for JBDS 3.0.0 GA release.

Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuid= e/en/images/first_seam/first_seam4.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuid= e/en/images/first_seam/first_seam5.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuid= e/en/images/getting_started/getting_started_1.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/e= n/images/getting_started/getting_started_4a.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/jbosstools-3.1.x/documentation/guides/Getting= StartedGuide/en/images/getting_started/getting_started_4a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/e= n/images/getting_started/getting_started_4b.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/jbosstools-3.1.x/documentation/guides/Getting= StartedGuide/en/images/getting_started/getting_started_4b.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/e= n/images/getting_started/getting_started_4c.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/jbosstools-3.1.x/documentation/guides/Getting= StartedGuide/en/images/getting_started/getting_started_4c.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/e= n/images/getting_started/getting_started_4d.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/jbosstools-3.1.x/documentation/guides/Getting= StartedGuide/en/images/getting_started/getting_started_4d.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/e= n/images/getting_started/getting_started_4e.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/jbosstools-3.1.x/documentation/guides/Getting= StartedGuide/en/images/getting_started/getting_started_4e.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/e= n/images/getting_started/getting_started_4f.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/jbosstools-3.1.x/documentation/guides/Getting= StartedGuide/en/images/getting_started/getting_started_4f.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuid= e/en/master_output.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/m= aster_output.xml 2010-03-04 12:57:57 UTC (rev 20652) +++ branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/m= aster_output.xml 2010-03-04 13:08:09 UTC (rev 20653) @@ -32,4291 +32,4383 @@ = = -]> - - Getting Started with JBoss Developer Studio - April 2008 - - 2007 - 2009 - JBoss by Red Hat - - Version: 3.1.0.CR= 1 - - - - PDF version - - - - = - - = - - - - - - - - - JBoss Developer Studio - Eclipse - Java - JBoss - - - Getting Started with JBoss Developer Studio - -
- What is JBDS? - JBoss Developer Studio is a= set of eclipse-based development tools that - are pre-configured for JBoss Enterprise Middleware Platforms and Red Ha= t Enterprise Linux. - Developers are not required to use JBoss De= veloper Studio to develop on - JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these = pre-configured tools offer - significant time-savings and value, making them more productive and spe= eding time to deployment. - This guide covers the first steps to get started working with JBoss Developer - Studio. You will learn how to install and configure necessa= ry software for your OS - (currently Linux, Microsoft Windows or Mac OSX). - Thus this guide will provide you with detailed info on how to star= t JDK, JBDS and JBoss - Tools. -
- -
- <diffmk:wrapper diffmk:change=3D"changed">Key Features of JBoss De= veloper Studio and Requirements</diffmk:wrapper> - For a start, we propose you to look through the table of main featu= res of JBoss Developer Studio: - - - = - Key Functionality of JBoss Developer Studio - - = - - - = - = - - - Feature - Benefit - = - - - = - - = - - JBoss Enterprise Application Platform - JBoss Developer Studio includes and integrates JBoss Ent= erprise Application Platform, the same version of the middleware platform t= hat Red Hat supports in production for 5 years. - - = - - New Seam Tools - JBoss Developer Studio includes brand new tools for Seam= . They provide wizards for creating new Seam projects, validation tools, ex= pression language code completion, testing tools, and wizards for generatin= g entity objects. - - = - - Visual Page Editor - JBoss Developer Studio includes a Visual Page Editor for= combined visual and source editing of Web pages. The Visual Page Editor ev= en renders AJAX-enabled RichFaces components. - - = - - AJAX Capabilities - JBoss Developer Studio includes a Technology Preview of = JBoss RichFaces. RichFaces provides nearly 70 skinnable components, includi= ng calendar, tree, dropdown menu, drag-and-drop components, and more. JBoss= Developer Studio=E2=80=99s Visual Page Editor can render RichFaces compone= nts. - - = - - JBoss Tools Palette - The JBoss Tools Palette contains a developer=E2=80=99s p= roject tag libraries and enables inserting tags into a JSP with one click. = The Tools Palette supports custom and 3rd party tags. - - = - - JBoss jBPM Tools - JBoss Developer Studio includes jBPM tooling for definin= g Seam page flows. - - = - - Spring Tools - JBoss Developer Studio includes Spring IDE for developin= g Spring applications. - - = - - Struts Tools - JBoss Developer Studio includes Struts tools for Struts = 1.x applications. - - = - - Optimized JBoss Application Server adapter - JBoss Developer Studio=E2=80=99s advanced JBoss AS adapt= er includes features like incremental deployment for fast development and i= s pre-configured for the included JBoss Application server. - - = - - Red Hat Enterprise Linux and RHN Access - JBoss Developer Studio includes access to Red Hat Enterp= rise Linux, Linux development tools, and Red Hat Network for development pu= rposes. - - = - - Project Examp= les - Tooling for e= asy installation of Examples. - - = - - JBossWeb Service - JBoss WS is a web service framework developed as a part = of the JBoss Application Server. It implements the JAX-WS specification tha= t defines a programming model and run-time architecture for implementing we= b services in Java, targeted at the Java Platform, Enterprise Edition 5 (Ja= va EE 5). - - - -
- = - JBDS requires JDK 5+ (JDK 6 in c= ase of EAP 5.0). Also it's important that = - the JVM's architecture matches the particular JBDS build, i.e. if you're on a = - 64-bit system and use the 64-bit JVM, you need the 64-bit JBDS. - = - For= the 32-bit version of JBDS use the 32-bit JVM or just use -vm flag to = - tell JBDS to use 32-bit java if the 64-bit one is found as the default. - = - - <diffmk:wrapper diffmk:change=3D"added">N= ote:</diffmk:wrapper> - On= Linux system with 64-bit JVM the visual editor may fail to start. In this = case you need the libstdc++.so.5 library. - See also the FAQ. - -
- = -
- - Configuring Your Java Environment - You must have a working = installation of JDK before you install JBoss Developer - Studio. Thus in t= his - guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux P= latform and Microsoft - Windows Platform. - -
- Installing and Configuring 32-bit Sun JDK 5.0 on Linux - To install 32-bit Sun JDK 5.0 on Linux and configure it, you shou= ld follow the next steps: - - - Download the Sun JDK 5.0 - (Java 2 Development Kit) from Sun's website. Choose "JDK 5.= 0 Update - <x>" (where "x" is the latest update number) for - download and then select "Red Hat Package Manager in self-extracting= " file - for Linux. Read the instructions on Sun's website for installing the= JDK. - - - If you don't want to use SysV service scripts you can install t= he - "self-extracting file" for Linux instead of choosing the "RPM in - self-extracting" file. In that case you can skip the next step menti= oned here. But it - is recommended to use the SysV service scripts for production server= s. - - - Download and install the appropriate -compat RPM from JPackage = here. - Please ensure you choose a matching version of the -compat package t= o the JDK you've - installed. - - - Create an environment variable that points to the JDK installat= ion directory and call it - JAVA_HOME. Add - $JAVA_HOME/bin - to the system path to be able to run java from the comma= nd line. You can do this - by adding the following lines to the .bashrc file in your home direc= tory. - - - - - - Note: - - =EF=BB=BFIf you have JDK already installed and added in your sys= tem path, you should add - $JAVA_HOME/bin before the old $PATH (not after it) - so that the new version of JDK can be found first, i. e. - export PATH=3D$JAVA_HOME/bin:$PATH - 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. - - - Set this variable for your account doing the installation and als= o for the user account - that will run the server. - - - If you have more than one version of JVM installed on your mach= ine, make sure you are - using the JDK 1.5 installation as the default java and javac. You ca= n do this using the - alternatives system. The alternatives system allows different versio= ns of Java from different - sources to co-exist on your system. - - -
- Select alternatives for java, javac and java_sdk_1.5.0 - - - As a root user, type the following command at the shell prompt= and you should see - something like this: - - - - Make sure the Sun version [jre-1.5.0-sun in this case] is select= ed (marked with a - '+' in the output), or select it by entering its number as prompted.<= /para> - - - Repeat the same for javac and java_sdk_1.5.0. - - - - You should verify that java, javac and java_sdk_1.5.0 all point = to the same manufacturer - and version. - - Note: - You can always override this step by setting the JAVA_HOME envi= ronment variable as - explained in the previous step. - - - - Make sure that the java executable is in your path and that yo= u are using an appropriate - version. To verify your Java environment, type "java -version" at t= he shell - prompt and you should see something like this: - - - -
- -
-
- Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windo= ws - - To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows,= follow these steps: - - - Download the Sun JDK 5.0 - (Java 2 Development Kit) 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 th= e installation. - - - Create an environment variable called JAVA_HOME that points to = the JDK installation - directory, for example: - C:\Program Files\Java\jdk1.5.0_11\ - - - - - In order to run java from the command line, add the jre= \bin directory - to your path, for example: - - C:\Program Files\Java\jdk1.5.0_11\jre\bin - - 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. - Now, when 32-bit Sun JDK 5.0 has been successfully installed, we = can pass on to the next - step. -
- -
- -
- - JBoss Developer Studio Installation - - This chapter will provide you with detailed information on how to = install JBoss - Developer Studio. - - JBDS comes with a simple installer, bundled with tested/pre-config= ured versions of Eclipse, - WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next ste= ps: - - - - First of all you need the appropriate installation file for your= platform from = - Red Hat - website. - - - Then run in console: - - - - Follow the instructions presented by the installation wizard: - - - -
- JBoss Developer Studio Installation Wizard - - - <= /imagedata> - - -
- - - - Provide the installation path - - - Select Java VM - - - -
- Select Java VM - - - <= /imagedata> - - -
- - - Tip: - By selecting - Default Java VM - you set default Java VM of your system (to verify your Jav= a environment, type - "java -version" in console). - - - Selecting - Specific Java VM - you can provide the path to non-default Java VM. - - - Note: - JBoss Developer Studio needs Java 5 and "gij" isn't available on - every platform. - - - - - Installation process includes JBoss Enterprise Application - Platform. Select - Yes to use it in= JBoss Developer Studio. - - Note: - JBDS 2.0.0.GA comes integrated with JBoss EAP 4.3, while the c= urrent 2.1.0.GA release of JBDS comes with JBoss EAP 5 that support EAP 5 a= dapter - and Seam 2.2. - - = - This step lets you configure locally available JBoss Applicatio= n Servers: = - - - -
- JBoss Enterprise Application Platform Installing - - - <= /imagedata> - - -
- - - You can fill the list automatically using the <= property moreinfo=3D"none">Find button: click Find, select a folder = where search of available JBoss Application Servers should be started and c= lick on Ok: - - = -
- Finding Servers in the Selected Directory - - - - - -
- - = - - All available servers in the selected directory will = be added to the list with the following information specified: Name, Type, = Version and Location. = - - - = - - You can also add servers one by one using the Add button: - - - = -
- Add Server to be Configured - - - - - -
- - -Click on Browse and select the server location. Fields Name, Type and Version will = be filled in automatically: - = -
- Specify Server Location - - - - - -
- - = - = - Click on Ok. The server is added to the list with the details on its type, versio= n and location. - = - = - = - The Remove button will the remove the selected server from the list. If necessary= , you can edit the server details clicking on the Edit button: - = -
- Edit Server - - - - - -
- - = - = - = - - - - - Click Next. Check your installation paths and see the components to install. If= you'd like to change - something, press the - Previous - button. Click - Next - to start installation. - - - - - -
- Summary Information - - - <= /imagedata> - - -
- -
- -
- - JBoss Developer Studio and JBoss Tools - - This section uncovers the points on the differences between JBoss Developer - Studio and JBoss Tools and provides the steps on JBoss - Tools installation as well. - -
- What is the difference? - - JBoss Tools is what went i= nto our JBoss Developer - Studio which comes as an easy-to-install Eclipse based IDE = fully configured and ready - to run with the bundled JBoss Enterprise A= pplication Platform. - - In short JBoss Tools are j= ust a set of Eclipse plugins and - JBoss Developer Studio adds: - - - An installer - - - Eclipse and Web Tools preconfigured - - - JBoss EAP with JBoss AS and Seam preconfigured - - - 3rd party plugins bundled and configured - - - Access to RHEL and Red Hat Network - - - Access to the JBoss/Red Hat supported software - - - For additional information see JBoss.com -
- -
- JBoss Tools Installation and Update - Here, let's consider the installation of the JBoss Tools - modules. - JBoss Tools is an umbrella= project for the JBoss developed plugins - that will make it into JBoss Developer Stu= dio. The JBoss Tools modules are: - - - JBoss AS Tools - - - Seam Tools - - - Hibernate Tools - - - Visual Page Editor - - - JST Tools - - - JBPM Tools - - - - To install the JBoss Tools plugins for Eclipse, you need the foll= owing: - - - - Get Eclipse and Web Too= ls (make sure you have the = - appropriate version = of Eclipse= ) - - - The current version of JBoss Tools (3.1.M2) targets at Eclipse 3.= 5/Galileo which is available from eclipse.org - - - Tip: - We recommend you do not use Eclipse.org update site to go from o= ld version of Eclipse to new one. - Instead we suggest that you download the full binary from here. - - - If you can only use Eclipse 3.3 use JBoss Tools 2.1.2, but - JBoss Tools 2.x will not have any of the new features. - - - Note: - Remember to choose the download that matches your OS and use Jav= a 5 when you run - it. - - - - - Get the latest JBoss Tools build - - - - Some of our newer plugins, like TPTP and BIRT, need additional dr= ivers. On the left side of - the download page you can find all of the required drivers for chosen = build and their versions. - Instead of downloading the nightly build version manually, it's a= lso possible to - get the latest release of JBoss Tools from one of our update sites: - - Stable Updates: http://download.jboss.org/jbosstools/updates/stable - - - Development Updates: http://download.jboss.org/jbosstools/update= s/development - - - - - - - Finally, install the build - - - - Unzip the file(s) directly into your Eclipse - plugins/features - directory and it will be readily available. It might be ne= cessary to start Eclipse - with eclipse -clean to make sure it starts clean and rereads the new l= ist of plugins. - - If you need to install any standalone plug-in from JBoss Tools vi= sit a JBoss = Tools Wiki page to read - about dependencies between standalone plug-ins. - = - You can update Jboss Tools and install a new version with the hel= p of "Install" wizard (Help > Install New Software...) - = -
- Updating Jboss Tools - - - - - -
- = - In "Work with" field add the path to the source to update from (e= .g. http://download.jboss.org/jbosstools/updates/development), check the ne= cessary software to install, more information about chosen software can be = found in "Details" section. -Follow "Available Software Sites" link to find more site to update f= rom - = -
- Available Software Sites - - - - - -
- = - - Note: - While installing JBoss Tools on GNU/Linux (64-bit) through the ec= lipse installation manager you may run into some problems which can interru= pt your installation process. - Please, read the = - Manual installation of JBoss Tool= s 3.1.x on Eclipse 3.5 on GNU/Linux (64-bit) = - wiki article which provides you with the necessary steps to do it corr= ect. - -
- -
- -
- Welcome to JBoss Developer Studio - In this section we'll show you how to work with the welcome page o= f the JBoss - Developer Studio. - The welcome page is the first page you see when you first launch <= property moreinfo=3D"none">JBoss Developer - Studio. - -
- Welcome to JBoss Developer Studio - - - <= /imagedata> - - -
- - With the help of its page you will be able: - - - to get quick access to Getting Started Documentation (guides, tu= torials and - viewlets) - - - -
- Getting Started Documentation - - - <= /imagedata> - - -
- - - - to create new Seam projects, jBPM Process, JSF or Struts project= s using JBDS - wizards - - - -
- Create New... - - - <= /imagedata> - - -
- - - - to get short description of perspectives that JBDS offers for mo= re productive - development - - - -
- Perspectives - - - <= /imagedata> - - -
- - - - to visit JBoss Developer Studio web resources. - - - -
- Web Resources - - - - - -
- - Start work with JBoss Developer Studio= by clicking on - Workbench - button or simply close the Welcome page. - -
- -
- - Upgrading - To upgrade, of course you can uninstall your current version and i= nstall the new one. - Now it's possible to upgrade from JBDS 2.0 to 2.1 using the update= site which is available at = - h= ttp://devstudio.jboss.com/updates/2.1. = - This is described more fully in the JBDS Update Guide. -
- -
- - Uninstalling - - - Make sure JBoss Developer Studio is not running - - - Uninstall your current version of JB= oss Developer Studio by running - Uninstaller - - -
- -
- - Support - If you have comments or questions, you can discuss them at our JBoss - Developer Studio Forum. - When writing to the forum for questions, please include the follow= ing information: - - - JBoss Developer Studio version - - - Exact error message - - - Steps to reproduce the issue - - - - JBDS subscribers can get ne= cessary support on our Support Portal. -
- - -
- - Other relevant resources on the topic - JBDS on RedHat: JBoss Developer - Studio - Forum: JBoss - Forum - - Wiki: JBo= ssToolsWiki = - = - Subscription: JBDS - Subscription - = - The latest documentation builds are available here. - = - - Matrix of supported platforms, runtimes = and technologies in JBossTools/JBDS -
- -
- - = - - - - - JBoss Developer Studio - Eclipse - Deploy - Deployment - JBoss - - - - Manage JBoss AS from JBoss Developer Studio - - In this chapter we'll focus more on how to operate the JBoss - AS from JBoss Developer= Studio. - JBoss Developer Studio 2.1.0.GA is shipped with JBoss EAP 5 - . When you followed the default installation of JBoss - Developer Studio, you should already have a JBoss E= AP 5 Server installed and - defined. To run JBoss AS you need JDK 1.5, JDK 6 is not formally s= upported yet, although - you may be able to start the server with it. - -
- - How to Manage the JBoss AS Bundled in JBDS - This section covers the basics of working with the JBoss Server - supported directly by JBDS via bundled AS plug-in. The server points to = - the JBoss Enterprise Application Platform 5.0 Runtime shipped = with JBDS. - = -
- JBoss EAP 5.0 Runtime - - - - - -
- = - To read more about AS plug-in, refer to the Server Manager guide. -
- - Starting JBoss Server - Starting JBoss Server is quite simple. JBoss - Developer Studio allows you to control its = behaviour with the help of - a special toolbar, where you could start it in a regular o= r debug mode, stop it or - restart it. - - - - To launch the server click the green-with-white-= arrow icon on the - JBoss Server View = or right click server name in - this view and select - Start - . If this view is not open, select - Window > Show V= iew > Other > Server - > JBoss Server View - - - -
- Starting from Icon - - - = - - -
- - While launching, server output is written to the Console - view: - -
- Console Output - - - = - - -
- When the server is started you should see - Started - in the square brackets right next its name in = JBoss Server - View. - -
- Server is Started - - - = - - -
- -
- -
- - Stopping JBoss Server - To stop the server, click the - Stop - icon in JBoss Serv= er View or right click the server - name and press - Stop. - -
- Stopping Server - - - = - - -
- When the server is stopped you will see - Stopped - in the square brackets next to its name. -
-
- - Server Container Preferences - You can control how JBoss De= veloper Studio interacts with - server containers in the Serve= r editor. Double-click the server - to open it in the editor. - -
- Server Overview - - - = - - -
- - Here you can specify some common settings: host name, se= rver name, runtime as well - as settings related to the publishing, timeouts and server= ports. - -
-
- -
- - How to Use Your Own JBoss AS Instance with JBDS - Although JBoss Developer Studio<= /property> works closely with - JBoss EAP 5 we do n= ot ultimately tie you to any particular - server for deployment. There are some servers that Studio supp= orts directly (via the - bundled Eclipse WTP plug-ins). In this section we discuss how = to manage self-installed - JBoss AS. Suppose you want to deploy the application to JBoss 4.2.3 - server. First of all you need to install it. -
- - JBoss AS Installation - - - Download the binary package of JBoss AS, e.g. JBoss 4.2.3 and save - it on your computer: http://labs.jboss.com/jbossas/downloads - - - It does not matter where on your system you install JBos= s server. - - - Note: - The installation of JBoss server into a directory th= at has a name containing - spaces provokes problems in some situations with Sun-b= ased VMs. Try to avoid - using installation folders that have spaces in their n= ames. - - - There is no requirement for root access to run JBoss Ser= ver on UNIX/Linux systems - because none of the default ports are within the 0-1023 pr= ivileged port - range. - - - After you have the binary archive you want to in= stall, use the JDK jar - tool (or any other ZIP extraction tool) to extract= the jboss-4.2.3.GA.zip - archive contents into a location of your choice. T= he jboss-4.2.3.GA.tgz - archive is a gzipped tar file that requires a gnut= ar compatible tar which - can handle the long pathnames in the archive. The = extraction process will - create a jboss-4.2.3.GA directory. - - -
- -
- - Adding and Configuring JBoss Server - Now we should add just installed server into server mana= ger in JBoss - Developer Studio. - - - Open the JBoss Serve= r View by selecting - Window > Show V= iew > Other > Server - > JBoss Server View - - - - Right click anywhere in this view and select - New Server - - - - Select - JBoss Community &g= t; JBoss 4.2 Server - - - -
- Selecting Server Name and Server Type - - - = - - -
- - - Note: - - Now in the New Server wi= zard there is a separation - between the .org servers (the - JBoss Community - category) and product server that comes bu= ndled with JBoss EAP (the - - JBoss Enterprise Middl= eware category). - - - - - To create a new runtime, which Jboss AS 4.2 matc= hes to, click - Next - - - - - - - In the next step make JBoss Developer Studio to know - where you have installed the Server and define JRE= . - - -
- Defining JBoss Runtime - - - - - -
- - Note: - When adding a new server you will need to specify wh= at JRE to use. It is - important to set this value to a full JDK, not JRE. Ag= ain, you need a full JDK - to run Web applications, JRE will not be enough. - - - - - In the next dialog verify the specified informat= ion and if something is - unfair go back and correct it - - -
- JBoss Runtime Summary - - - - - -
- - - In the last wizard's dialog modify the projects = that are - configured on the server and click - Finish - . - - -
- Configuring Projects - - - - - -
- A new JBoss Server should now appear in the JBoss - Server view. -
- New JBoss Server - - - - - -
- Now, we are ready to create the first web application. -
- -
-
- = - = - - - - - JBoss Developer Studio - Seam - JBoss - - - - Write Your First Project with JBoss Developer Studio - - This chapter is a set of hands-on labs. You get step-by-step infor= mation about how the JBoss - Developer Studio can be used during the development process. - -
- Create a Seam Application - - In this section you get to know how to create a Seam project in = JBDS, how to start the - server and what a structure your project has after creating. - -
- Start Development Database - - Before opening the JBoss Developer studio you need to download and start a Workshop = Database. - To start the database just run ./r= unDBServer.sh or - runDBServer.bat from the = database directory. - The end result should be a console window that looks like: - -
- Starting DataBase - - - - - -
- -
- -
- Create and deploy Seam Web Project - - Minimize the terminal window and run the JBoss Developer Studio - from Applications Menu or from the desktop icon. - First of all you get the Workspace Launcher. Change the defaul= t workspace location if - it's needed. Click on Ok. <= /para> - -
- Workspace Launcher Dialog - - - - - -
- - After startup, you see the welcome page. You could read how to= work with welcome pages - in previous chapter. Now select <= property moreinfo=3D"none">Create - New... icon and then press on Create Seam Project - link. - - The New Seam Project wizard is started. You need to enter a name - (e.g., "workshop") and a location directory for your new project. = The - wizard has an option for selecting the actual Server (and not just= WTP runtime) that will be - used for the project. This allows the wizard to correctly identify= where the needed - datasource and driver libraries need to go. - -
- New Seam Project Wizard - - - - - -
- - All settings are already specified here, you can just modify t= he Configuration. Click on - the - Modify... - button to configure your custom facets pattern: - - -
- Project Facets Specifying - - - - - -
- - On the whole the dialog allows to select the "features" you wa= nt to use in your project. - Doing this JBoss Developer Studio setups the appropriate tooling for - your project. Since JBoss Seam integrates all popular Java EE fram= eworks, you can select any - combination of technologies from the list. Here, for the default c= onfiguration, Dynamic Web - Module, Java, JavaServer Faces (JSF), and Seam Facet are already s= elected for a typical - database-driven web application. The default project facets should= suffice. - - In the Project Facets f= orm you can also bring up server runtimes - panel by clicking Runtimes= tab on the right corner. This panel shows - available server runtimes. - -
- Runtimes Selecting - - - - - -
- - Click on - Ok - and then - Next - to proceed further. - - A dynamic web application contains both web pages and Java cod= e. The wizard will ask you - where you want to put those files. You can just leave the default = values or choose another - folder. - -
- Web Module Settings - - - - - -
- - On the next form, you will be able to select where those libra= ry JARs come from. The - easiest is just to select the JARs provided by the JBoss AS runtim= e associated with this - project. That is why it is important to chose the right JBoss AS 4= .2 runtime in the project - setup window. - - - Check - Server Supplied JSF Implementati= on - . We will use JSF - implementation that comes with JBoss server - - - Click - Next - - - - -
- JSF Capabilities Adding - - - - - -
- - Next wizard step needs more settings that previous. Let's star= t with - General section. - Leave the default Seam runtime and check a WAR deployment. - -
- Seam Facet Setting - - - - - -
- - Next Database section i= s a little tricky. The Connection - Profile needs to be edited so that the new project wo= rks properly with the - external HSQLDB server. By default the project wizard tries to use= the JBoss embedded - HSQLDB, but the tutorial uses an external database to replicate a = more real world - development scenario. Click on Edit to modify the Connection - Profile. - -
- DataBase Setting - - - - - -
- - Select JDBC Connection Properties<= /property>. Make sure the URL is set to - jdbc:hsqldb:hsql://localhost:1701 - - -
- JDBC Connection Properties - - - - - -
- - Try click on Test Connection button. It probably won=E2=80=99t work. This - happens if the hsql jdbc driver is not exactly the same. This can = be worked around by - modifying the HSQLDB database driver settings. To modify the setti= ngs, click the - =E2=80=9C...=E2=80=9D nex= t to the drop-down box. - - The proper Driver JAR File should be listed under Driver File(s). - Select the hsqldb.jar file found in the database/lib directory and= click on - Ok. - -
- Driver Details - - - - - -
- - Select Hypersonic DB an= d click on Ok. Again, - this only happens if the selected hsqldb.jar is different from the= running database. - -
- Hypersonic DB Selecting - - - - - -
- - Now, the Test Connection should succeed. After testing the - connection, click on Ok. - -
- Connection Testing - - - - - -
- - You can leave the Code Generation<= /property> section as is. It refers to Java - packages in which the generated code will be placed. - -
- Code Generation Setting - - - - - -
- - Click on Finish button.= Now, there should be a new Seam project - called =E2=80=9Cworkshop=E2=80=9D listed in Package Explorer view.= - -
- "worskhop" Project in the Package Explorer - - - - - -
-
- -
- Start JBoss Application Server - - The complete information on how to manage JBoss AS from JBoss = Developer Studio you can - read in a corresponding chapter. - Now you just need to start the server by clicking on the Start= the server icon ( = - - - - - ) in the - JBoss Server View. - - Then run the project by selecting the project and use Run As... > - Run on Server. - - - Note: - If the project does not show up, then you can use a normal b= rowser and use - http://localhost:8080/workshop/hom= e.seam - as the url. - - - Your project looks like this: - -
- "workshop" Project Started - - - - - -
- -
- -
- Workshop Project Code Overview - - Now let's examine the project and its structure. Go back to th= e Package Explorer view in - JBoss Developer Studio. - - It seems like it's not much for project but this shell applica= tion contains a login - screen with default login logic, a menu template that can be furth= er modified, and other - layout templates. - - It's important to note that the business logic will reside in = the - src/hot - folder, by default. And, the package naming convention= s that were used in New Seam - project wizard could have been changed to something dif= ferent from - org.domain.workshop.session. - Also, notice that there is a default Authenticator. java - file. This is where custom security logic can be added. Seam has a= nice declarative security - model that we will explore in a bit more detail later on. The - src/main - folder is a model directory. It stores the project's J= PA entity beans. - = -
- Project Structure - - - - - -
- = - The view tier of the - application is also important. Seam uses facelets and there is a b= uilt-in facelets GUI - editor that has some nice WYSIWYG and component drag/drop function= ality. Try this out by - opening home.xhtml from WebContent folder. - -
- Facelets GUI Editor - - - - - -
- - Notice that the templates reside in the - WebContent/layout - folder. There is a stylesheet in the - WebContent/stylesheet - folder. There is also a login and default error page. = The Facelet editor will be - explored in more detail later in the lab. - - The project already has a datasource that was created per the = Seam project wizard - database settings. And, obviously all of the Seam specific configu= ration files and JAR - dependencies are included and placed in the proper locations. On l= ast noteworthy line item - is related to the build script. There isn=E2=80=99t a build script= because the Eclipse WTP(Web Tools - Project) plugin is used to publish web application changes. As you= can see, JBoss Developer - Studio is removing a great deal of complexity from the enterprise = Java project - setup/deployment process. The end result is a developer that is wr= iting code, not spending - days/weeks trying to figure out how to get a decent development en= vironment and project - build process. - -
- -
- - -
- Seam Action Development - - Now, it=E2=80=99s time to write some code. The good news is that= JBoss Developer Studio can also - help out in this respect. In this section, we will create a new Seam= Action POJO and facelet - with some custom business logic and some GUI changes. - -
- Create a New Seam Action - - Go to main menu bar and click on - File > New > New Seam Action - to start the New Seam Action wizard. - - Specify a Seam component name (e.g., "myAction"). - The other properties will be auto-completed for you so there is no= need to change them. - Click on Finish. - -
- New Seam Action Wizard - - - - - -
- - Now, open the MyAction.java file and replace the - "myAction" method with this logic: - - - - You also need to import the java.u= til.Calendar class by clicking - CTRL + Shift + O. - -
- -
- Test Seam Action - - The new action can be tested by browsing the workshop-test pro= ject. JBoss Developer - Studio has already created a TestNG test case for you. - -
- "workshop-test" Project - - - - - -
- - The test case simulates a Seam component/method execution for = the - MyAction.myAction() logic= . - To run the test case, right click on MyActionTest.xml and click - Run As > TestNG Suite - or use the Run As... toolbar shortcut as shown - below. - -
- TestNG Running - - - - - -
- - With any luck, the test case will pass. Look at the TestNG vie= w. - -
- TestNG Results - - - - - -
- - Now, it=E2=80=99s safe to test the new Seam Action in a web br= owser. The fastest way to do that - is to right click on myAction.xhtml and use - Run As... > Run On Server - which will show the appropriate url in the browser. Al= ternatively you can - manually enter - http://localhost:8080/workshop/myAct= ion.seam - into a browser. - -
- Seam Action in a Web Browser - - - - - -
- -
- -
- Modify Seam Action User Interface - - Browse to - http://localhost:8080/workshop/myAct= ion.seam - and click on myAction. This executes the =E2=80=9CmyAction=E2=80=9D method. - This looks pretty good, but we could make this page look a little = better. - - Open - WebContent/myAction.xhtml - in JBoss Developer Studio to use the nice facelets edi= tor. - -
- Open Seam Action with Editor - - - - - -
- - Right click on the "myAction!" button in the visual part of ed= itor and - select <h:commandButton> Attribu= tes. - -
- Seam Action Editing - - - - - -
- - Change the value of the= button to something different. If desired, - you can change any other text on the page. Then, type - CTRL + S - to save the facelet. - -
- Attributes Dialog - - - - - -
- - Refresh - http://localhost:8080/workshop/myAct= ion.seam - and now you should see your changes. - - Notice that you did not have to publish the application. JBoss= Developer Studio - auto-published it for you. - -
- Seam Action Is Modified - - - - - -
- -
- - -
- -
- Declarative Security - - In this section you will see how it=E2=80=99s easy to secure the= facelets and facelet components - in Seam. Let=E2=80=99s go ahead and secure the action button, then w= e will secure the entire - page. - -
- Edit Login Authentication Logic - - There is a class called Authentica= tor.java. The login page will - execute the Authenticator.authenticate= () method by default, so we=E2=80=99ll - start by adding some custom login logic. - Open Authenticator.java= in JBoss Developer Studio and replace the - authenticate() method wit= h this code: - - - -
-
- Secure Seam Page Component - - Open myAction.xhtml and= add a new secured command button: - ]]> - - Refresh - http://localhost:8080/workshop/myAct= ion.seam - If you are not logged in you will only see one button.= If you are logged in, - there will be two buttons. - - -
- One Button on a Page - - - - - -
- - The secured button is not visible because the user isn=E2=80= =99t logged in as - "admin". - -
- Secured Button is Visible - - - - - -
- - The user is logged in as "admin". Securing - components is easy but securing pages is pretty simple as well. - Open - WebContent/WEB-INF/pages.xml - . Then add this markup directly underneath the <page= s> - element: - - ]]> - - Refresh - http://localhost:8080/workshop/myAct= ion.seam - If you are not logged in you will get bounced back to = the login page. - -
- Login Page - - - - - -
- - Thus, if you enter login credentials for the - "admin" user, you will be= re-directed to the - secured page and secured component. If you enter different login c= redentials, page access - will be granted, but the secured component will not be displayed.<= /para> - - Congratulations! You have secured your new action both at the = facelet component and page - level. You also added custom authentication logic to the login act= ion. - -
- -
- -
- Browsing Workshop Database - - In this section you get to know how to use the workshop database= that was started at the - beginning of the lab. - -
- Database Connectivity Setup - - The workshop data can be browsed inside of JBoss Developer Stu= dio. - - To open the Data Source Explorer, click on Window > Open Perspective - > Other > Database Development. - In the Data Source Explorer, expand a Databases node and select a - Default database. Right c= lick on it, select - Connect from the context = menu. - -
- Data Source Explorer - - - - - -
- -
- -
- Browse Workshop Database - - Then in the current view, drill down to the CUSTOMERS table. - -
- "CUSTOMERS" Table - - - - - -
- - Right click on CUSTOMERS, select - Data > Sample Contents - to view the data in the table. - - There should be a SQL Results view on the workbench, but it co= uld be hidden. Click on - the "Result1" tab in the ri= ght side and you should - see the data in the CUSTOMERS table. - - -
- SQL Results View - - - - - -
- - - Note: - If you can=E2=80=99t find the SQL Results view tab, click on= Window > Show - View > Other > SQL Development > SQL Results. - - - Congratulations! You just connected to the workshop database a= nd queried the content - using Database Explorer tools. - -
- -
- -
- Database Programming - - Now, it=E2=80=99s time to reverse engineer the workshop database= into a fully functioning Seam - CRUD(Create Read Update Delete) application. - -
- Reverse Engineer CRUD from a Running Database - - In JBoss Developer Studio, switch to Seam - perspective, and then right-click the project and sel= ect - New > Seam Generate E= ntities. - - "workshop" project in the Seam Gen= erate Entities - wizard will be selected automatically. There is no ne= ed to change something - more, click - Next - to proceed further. - -
- Generate Seam Entities - - - - - -
- - On the next page use the - Include - button to include all the tables from the database and= click - Finish. - -
- Selecting Tables - - - - - -
- - After running the Generate Entities action, you will see new <= emphasis> - org.domain.workshop.entity - classes. These classes represent insert/update/delete/= query logic. - -
- org.domain.workshop.entity Classes - - - - - -
- - There are also - org.domain.workshop.entity - package that contains the JPA classes. These are the e= ntity beans that are - mapped to database tables.Note,that you can use Seam refactoring t= ools with Seam components. - Read more about it in Seam r= efactoring tools chapter of Seam Dev Tools Reference Guide. - - Last, but not least, there are facelets for all of the CRUD sc= reens. The best way to get - a feel for the generated code is to open a browser and play around= with the application. Go - to - http://localhost:8080/workshop - and insert/update/delete/query a few records. There is= quite a bit of AJAX in - this application, but which we will explore further later on in th= e lab. For now, take note - of the page tabs, required field logic and data table sorting in t= he list pages. - -
- CustomersList.xhtml in the Editor - - - - - -
- - Congratulations! You now have a fully functioning CRUD applica= tion that is already AJAX - enabled. - -
- -
- Use Hibernate Tools to Query Data via JPA - - Now, it's time to write some JPA queries using the Hibernate p= erspective in - JBoss Developer Studio. - In the upper right corner of the workbench there is a small ic= on (see the figure below), - click on it and choose Hibernate. - -
- Hibernate Perspective - - - - - -
- - Look at the Hibernate Configurations view. In the "workshop" p= roject, - drill down on the Session Factory and notice that the JPA - entities/attributes are listed in a nice tree view. - -
- Hibernate Configurations View - - - - - -
- - Right click on the Session Factory= and select HQL - Editor. This will open a JPA query scratch pad window= . - - Write your query and click on the "Hibernate Dynamic SQL Previ= ew" tab. - You should see the SQL that will be executed if this JPA query is = run. - -
- JPA Query Editor - - - - - -
- - Run the query by clicking on the green run icon. - - The results are listed in the "Hibernate Query Result" tab. Th= ere is a - "Properties" tab in the workbench that can be used to see a specif= ic JPA - result. These results represent the JPA objects because our query = did not specify column - names. - -
- Hibernate Query Result View - - - - - -
- - The query can be refined, and take note that there is nice cod= e completion in the JPA - query editor. - -
- Code Completion - - - - - -
- - A refined query will return results that are more ResultSet or= iented. Notice the join - logic that JPA supports. - -
- The Hibernate Query Result - - - - - -
- - - There was no need to specify an Em= ployees table in the - from part of the JPA quer= y because JPA supports reference traversal - via Java class attribute references. Not only are JPA and HQL quer= ies fully supported, but - Criteria based queries can also be written in the Criteria Editor.= You should spend some - time tinkering with different queries and possibly Criteria based = queries, even though the - instructions are not provided in this lab. - -
- Criteria Editor - - - - - -
- -
- -
- Use Hibernate Tools to visualize the Data Model - - Now, it=E2=80=99s time to view the data model for the workshop= database. - - In the Hibernate Configurations view, select "workshop" projec= t and - expand the Configuration no= de. Select the - Customers entity, right c= lick on it, choose Open Mapping - Diagram. - -
- Mapping Diagram Opening - - - - - -
- - - You see a Diagram tab for the CUSTOMERS table and any tables t= hat have FK references. - This is a handy way to view the data model and JPA mappings. Now, = you=E2=80=99ve got access to - something that the Erwin Data Modeler can=E2=80=99t do. - - -
- Diagram Tab - - - - - -
- -
-
- - -
- Rich Components - - This lab will conclude with one last AJAX twist. In this section= we add a RichFaces - inputNumberSlider to the Or= der Details edit screen. - -
- Add a Richfaces component to the CRUD Application - - Switch to Seam perspective, open - WebContent/OrderdetailsEdit.xhtml - in JBoss Developer Studio. - Change the form field values using the visual editor. Seam has= generated the form field - names that match the database column names. This is not ideal for = business users. - -
- Form Fields Editing - - - - - -
- - Also, replace the QTY Ordered input field with a inputNumberSlider. - You can use the JBoss Developer Studio palette or right click on t= he form and insert the - RichFaces component. - -
- Insert RichFaces Component from Context Menu - - - - - -
- - One the last option is to use the source view and manually cop= y the inputNumberSlider - markup listed below: - - ]]> - -
- Manually coping Source Code - - - - - -
- - The end result is an edit page that has better form labels and= a new RichFaces - control. - -
- The Result Page - - - - - -
- - Congratulations! You have completed the JBoss Developer Studio= lab. - -
- -
-
- = - = - - - - - JBoss Developer Studio - JSP - JBoss - - - Developing a simple JSP web application - = - - Note: - We highly recommend developing in Seam= . This chapter is for users - who for some reason cannot use Seam. - - = - In this chapter you'll find out how to create a simple JSP application using the - JBoss Developer Studio. The appli= cation will show a classic - "Hello World!" on the page. - We'll assume that you have already launched JBoss Developer - Studio and also that the Web Deve= lopment perspective is the - current perspective. If not, make it active by selecting - Window > Open Perspective > Web Devel= opment - from the menu bar or by selecting - Window > Open Perspective > Other...<= /property> - from the menu bar and then selecting Web Development from th= e Select Perspective - dialog box. - = -
- - Setting Up the Project - We are going to start with the creating a Dynamic Web Project with= a minimal - structure, i.e. with just required facets. Thus this section will perfo= rm you all - necessary steps on how to do this. - - - Go to the menu bar and select - File > New > Other... - - - - Select - Web > Dynamic Web Project - in the New Project dialog box - - - Click - Next - - - - - Enter "jspHello" as a project name - - - Then select - Minimal Configuration - from the list of possible configurations and click - Finish - - - -
- Create New Web Project - - - <= /imagedata> - - -
- = - The - jspHello - node should appear in the upper-left Package Explorer - view. -
- New Web Project - - - <= /imagedata> - - -
-
- = -
- - Creating JSP Page - This section covers all the points how to create, edit and then pr= eview JSP page. - In our simple application we need to create only one JSP page whic= h displays a - "Hello World!" message. - - - Right click WebContent >= ; New > - JSP. - - - Type "hello.jsp" for a file name and click the - Next - button. - - - In the next window you can choose a template for your jsp page and= see its preview. - - - Select - New JSP File (xhtml) - template and click - Finish - button. - - -
- Create JSP Page - - - <= /imagedata> - - -
- Our hello.jsp page will now appear in = - Project Explorer. - -
- - Editing a JSP Page - Let's now make a little change so that a jsp page displays - "Hello World!" message. - - - - - = - Insert this line inside the = - <body> </body> - - tag: - - - - ]]> - - = - Notice that content assist functionality is always available when= you are typing: -
- Content Assist in JSP Page - - - = - - -
- After changes made your - hello.jsp - page should look like this: -
- Hello.jsp Page Source - - - = - - -
- = - This line will actually output "Hello - World!" message in the Console<= /property>. To make the - message displayed in the Browser, just replace this line with the simp= le - Hello World!. -
- = -
- - web.xml file - When you are creating web project the wizard creates the - web.xml - for you automatically. The web.= xml file editor - provided by JBoss Developer Studio is available in two modes: - Tree and Source. -
- Web.xml in Design and Source Mode - - - - - -
- Both modes are fully synchronized. Let's add mapping to our - hello.jsp - page in - web.xml - file. - - - Switch to Source tab. - - - Add the next code into = - <welcome-file-list> - : - - - hello.jsp -]]> - If you come back to Tree m= ode you will see that the changes - made are automatically reflected in that mode. - Actually you don't really need to do any configurations right now= . -
- = -
- - Deploying the project - While creating any web project you could experience a pain writin= g ant scripts and - managing the packaging even when writing the most trivial web applicat= ions. With - JBoss Developer Studio you are = saved from such a pain. All - you need is to start JBoss Server and launch your application - in your favorite browser. - You can also create a war archive with JBDS's Archive Tools - and export it to any web server. -
- - WAR Config - Project archives managing is available through Project Archives view. - - - Select - Window > Show view > Other > J= Boss - Tools > Project archives - from menu bar - - - Select a project in Package Explorer you want to be archived - - - In Project Archives you w= ill see available archive types - for the project: -
- Project Archives - - - - - -
- - - Click, for example, - WAR - option to create war archive - - - In the New WAR dialog you= can see automatically selected - default values. -
- New WAR Archive - - - - - -
- - - Click - Next - to see a stub archive configuration for your project: - Stub Archive Configuration - - - - - - - - - - Click - Finish. The - .war file will appear in Package - Explorer and also in Projec= t Archives - view as structure tree:
- Archive is Created - - - - - -
-
- Archive in Project Archives View - - - - - -
-
-
-
- Via Project Archives view= you could now edit your - archive, add new folders, publish to server, and so on: -
- Configure Archive - - - - - -
-
- = -
- - Auto redeploy - When you are creating a web application and register it on JBoss - Server it is automatically deployed into - /deploy directory of the server. JBDS comes with= the - feature of auto-redeploy. It means that you don't need to restart - JBoss Server. Any changes made= in the application in - exploded format will trigger a redeployment on the server. - = - You can also use the "Finger touch" button for a quick restart o= f the project without restarting the server: -
- Finger Touch button - - - - - -
= - The "Finger" touches descriptors dependent on project (i.e. web.= xml for WAR, application.xml for EAR, jboss-esb.xml in ESB projects). - = -
- = -
- = -
- - JSP Page Preview - JBDS comes with JSP design= -time preview features. When - designing JSP pages you can easily preview how they will look during r= untime. You - can even a= ttach your stylesheet to the - Preview. - - - Make a little change to - hello.jsp - page, e.g. put this code snippet: - - - -]]> - - - Click - Save - button. - - - Switch to Preview page by clicking = Preview tab at the - bottom of the page. You will see how the page will look at runtime.<= /para> - - - -
-
- - Launch JSP Project - Let's now launch our project on server. We'll use - JBoss Server that is shipped wi= th JBoss Developer - Studio. You can do it by performing one of the following a= ctions: - - - Start JBoss Server from JBoss - Server view by clicking the Start the server icon ( - - - - - ) . - - - = - - - Click the Run icon or right click your project folder and selec= t - Run As > Run on Server. If you - haven't made any changes in - web.xml - file or cleared it out you can launch the application by= right - clicking the - hello.jsp - page and selecting - Run on the Server ( = - - - - - ). - - - = - You should see the next page in a Browser : -
- Running Project - - - - - -
- Thus with the help of this chapter you've learnt how to organize = a Dynamic - Web Project with a minimal configuration, add any staff to it (in our = case it's - just one jsp page) and deploy and run it on the JBoss Server - shipped with JBDS. - -
- = -
-
- - = - - - - - JBoss Developer Studio - JSF - JBoss - RAD - - - RAD development of a simple JSF application - - - Note: - We highly recommend developing in Seam. This chapter is for users - who for some reason cannot use Sea= m. - - - In this chapter you will see how to create a simple JSF applicat= ion being based on - "RAD" philosophy. We wi= ll create the familiar - Guess Number application. The scenario is the following. You are a= sked to guess a number - between 0 and 100. If the guess is correct, a success page is disp= layed with a link to play - again. If the guess is incorrect, a message is printed notifying t= hat a smaller or a larger - number should be entered and the game continues. - We'll show you how to create such an application from scratch, a= long the way - demonstrating powerful features of JBoss Developer Studio such as = project templating, Visual - Page Editor, code completion and others. You will design the JSF a= pplication and then run - the application from inside JBoss Developer Studio using the bundl= ed JBoss server. - -
- - Setting up the project - First, you should create a JSF 1.2 project using an integrat= ed JBDS's new - project wizard and predefined templates. Follow the next steps= : - - - In Web Projects View (if it is not open select - Window > Show View = > Others > JBoss Tools Web - > Web Projects View) = click - Create New JSF Project= - button.
- Create New JSF Project - - - - - -
-
- - - Put GuessNumber as a project name, in JSF Environment - drop down list choose JSF = 1.2 - - - Leave everything else as it is and click - Finish - - -
- Our project will appear in Project Explorer and Web Projects= Views. As you can see - JBoss Developer Studio has created for us the whole skeleton f= or the project with all - needed libraries, faces-config.xml and web.xml files. -
- New JSF Project - - - - - -
- - As the project has been set up, new JSP pages should be crea= ted now. -
-
- - Creating JSP Pages - - Here, we are going to add two pages to our application. The = first page is - inputnumber.jsp. It prompts you to enter a number. If the gues= s is incorrect, the same - page will be redisplayed with a message indicating whether a s= maller or a larger number - should be tried. The second page is success.jsp. This page wil= l be shown after you guess - the number correctly. From this page you also have the option = to play the game again. - - Now, we will guide you through the steps on how to do this.<= /para> - - - Open - faces-config.xml - file - - - Right click anywhere on the diagram mode - - - From the context menu select - New View - - - -
- Create New View - - - - - -
- - - - Type - pages/inputnumber - as the value for - From-view-id - - - - Leave everything else as is and click - Finish - - - - In the same way create another jsf view. Type - pages/success - as the value for - From-view-id - - - - Select - File > Save - - - - On the diagram you will see two created views. -
- New Views - - - - - -
-
- -
- - Creating Transition between two views - Then, we should create connection between jsp pages. - - - In the diagram, select the - Create New Connection<= /property> - icon third from the top along the upper le= ft side of the diagram to - get an arrow cursor with a two-pronged plug at the arr= ow's bottom
- Create Connection - - - - - -
-
-
- - Click on the - pages/inputnumber - page icon and then click on the - pages/success - page icon - -
- A transition should appear between the two icons of views. -
- Created Connection - - - - - -
- - - Select - File > Save - from the menu bar - - -
- -
- - Creating Resource File - A resource file is just a file with a .properties<= /emphasis> extension for - collecting text messages in one central place. JBoss Developer= Studio allows you to - create quickly a resource file. The messages stored in resourc= e file can be displayed to - you on a Web page during application execution. - With resource file first, you don't hard code anything into = the JSP pages. - And second, it makes it easier to translate your application t= o other languages. All you - have to do is to translate all your messages to the other lang= uage and save them in a - new properties file with a name that ends with the appropriate= ISO-639 language code. - It is a good idea to keep your resources inside the - JavaSource - folder, where you keep your .java files. Every tim= e you build the project, - all .properties files will then be copied= to the - classes folder by default. - - - Right click - JavaSource - folder and select - New > Folder - - - - Type - game - for Folder name and click - Finish - - - - Your resource file and java bean will be stored in this fold= er. - - - Right click on - game folder - and select - New > Properties Fi= le - - - - Type - messages - as the value for "name" attribute and clic= k - Finish - - - - JBoss Developer Studio will automatically open - messages.properties fil= e for editing. -
- Messages.properties File - - - - - -
- - - Click - Add - button for adding new attribute to your re= source file - - - Type - how_to_play - for "name" and - Please pick a number b= etween 0 and 100. - for value - - - Click - Finish - - - - In such a way add the next properties: - - - - - - Click - File > Save - from the menu bar - - - Your .properties file should now look like follows: -
- Properties are Added - - - - - -
- - Up - and - Down - buttons allow you to move you attribute on the lis= t. For delete the attribute, choose it and press - Delete b= utton. - If you want to change a value or a name of your attribute, c= lick on it and than on - Edit button.= - = - If the .properties file is rather big and there are a lot of= entries in it, you can use filtering and regular expressions to find the n= ecessary ones. The Filter and Regular Expressions Search is implemented by = an expandable panel, closed by default: - When "Expression" is not selected (as by default), filter is= case insensitive. When "Expression" is selected, filter uses regular expre= ssions which are case sensitive -
- Filter and Regular Expressions Search Panel - - - - - -
- Enter the characters that should be searched for in the ent= ries to the 'name' or 'value' input fields accordingly. The filtered resul= ts will be displayed in the table below: - = -
- Filter results - - - - - -
- = - When using regular expressions please note, that regular exp= ression syntax does not use "*" for any characters and "?" for any one char= acter. It's necessary to use "." for any one character and ".*" for any cha= racters. Symbols "*" and "?" are used to show that the preceding token is n= ot required, for example, "a.a" matches "aba" but not "aa", while "a.?a" or= a.*a" matches both; besides "a.*a" matches "abcda". - To find the exact match, use sequences \A and \z in expressi= on. For example, expression "\Adate\z" matches only string "date"; expressi= on "\Adate" matches "date" and "dateline", expression "date\z" matches "dat= e" and "Begin date", and expression "date" matches all of them. - = -
- -
- - Creating Java Bean - In this section you'll see how to create a Java bean that wi= ll hold business - logic of our application. - - - Right click - game folder - - - - Select - New > Class - - - - Type - NumberBean - for bean name - - - A java bean is created. - - - Declare the variable of your entered number: - - - - JBDS allows to quickly generate getters and setters for java= bean. - - - Right click - NumberBean.java - in Package Explorer - - - Select - Source > Generate G= etters and Setters... - - - - Check - userNumber - box and click - OK - -
- Generate Getters and Setters - - - - - -
-
-
- - Add the declaration of the second variable - -
- - - - .. other bean methods: - - - randomNumber ) = - msg =3D bundle.getString("tryagain_smaller"); - else // if number smaller, get appropriate message - msg =3D bundle.getString("tryagain_bigger"); = - // add message to be displayed on the page via tag - context.addMessage (null, new FacesMessage(msg)); = - // return 'tryagain' for navigation - return "tryagain"; - } - } -]]> - - - And the import declarations: - - - - The whole java bean should look as follows: - randomNumber ) = - msg =3D bundle.getString("tryagain_smaller"); - else // if number smaller, get appropriate message - msg =3D bundle.getString("tryagain_bigger"); - = - // add message to be displayed on the page via tag - context.addMessage (null, new FacesMessage(msg)); = - // return 'tryagain' for navigation - return "tryagain"; - } - } -} -]]> -
- -
- - Editing faces-config.xml File - In this section you know about faces-config.xml file. - This file holds two navigation rules and defines the backing= bean used. - - - Open faces-config.xml file in a source mode - - - Add here one more navigation rule and a managed bean= declarations that the - content of the file looks like this: - - - - - = - - * - - playagain = - /pages/inputnumber.jsp - - - - - /pages/inputnumber.jsp - - success = - /pages/success.jsp - - - = - - NumberBean - game.NumberBean - session - - = - -]]> - The first navigation rule states that from any page (* stands for - any page) an outcome of playagain will take you to - /pages/inputnumber.jsp - . Outcome values are returned from backing bean met= hods in this example. The - second navigation rule states that if you are at the page - /pages/inputnumber.jsp - , and the outcome is success, then navigate to the = - /pages/success.jsp - page. -
-
- - Editing the JSP View Files - Now, we will continue editing the JSP files for our two "vie= ws" using - Visual Page Editor. -
- - Editing inputnumber.jsp page - First, let's dwell on how to edit inputnumber.jsp. - On this page we will have an output text component displ= aying a message, a text - field for user's number entering and a button for input su= bmission. - - - Open inputnumber.jsp by double-clicking on the <= emphasis> - /pages/inputnumber= . jsp - icon - - - The Visual Page Editor will open in a screen split betwe= en source code along the - top and a WYSIWIG view along the bottom. You can see that = some JSF code will be - already generated as we choose a template when creating th= e page. - At the beginning it's necessary to create a = - <h:form> - component where all others components are put. - - - Place the mouse cursor inside = - <f:view> - </f:view> - - - - Go to JBoss Tools Palette and expand JSF HTML fo= lder by selecting - it - - - Click on = - <h:form> - tag
- Insert h:form - - - - - -
-
-
- - In the dialog Insert Tag select - id - and click on this line below the value= header. A blinking cursor - will appear in a input text field inviting to ente= r a value of id
- Define Id of Form - - - - - -
-
-
- - Type - inputNumbers - and click - Finish - - -
- In source view you can see the declaration of a form. -
- Created Form - - - - - -
- First let's declare the properties file in inputnumber.j= sp page using the - loadBundle JSF tag. - - - Put this declaration on the top of a page, right= after the first two - lines: - - - -]]> - As always JBDS provides code assist: -
- Code Assist - - - - - -
- - - Switch to Visual tab, so it could be possible to= work with the editor - completely in its WYSIWYG mode - - - Click on - outputText, drag the cursor over to the - editor, and drop it inside the blue box in the edi= tor - - - - Select - value - and click on this line below "value" - header - - - Click ...= button next to the value field - - - JBDS will nicely propose you to choose within available = values: -
- Choose Value - - - - - -
- - - Expand - Resource Bundles &= gt; msg - - - - Select - how_to_play - value and click - Ok. Then click - Finish - -
- Selecting Value - - - - - -
-
-
-
- The text will appear on the page: -
- Created OutputText Component - - - - - -
- - - Switch to Source mode and insert = - <br/> - tag after = - <h:outputText> - component to make a new line. - - - Click - Save - button. - - - On the Palette click on - inputText, drag the cursor over to the - editor, and drop it inside the editor after the te= xt. - - - Switch to a Source mode and insert - <br/> - tag after = - <h:outputText> - component to make a new line - - - Click - Save - button - - - On the Palette click on - inputText, drag the cursor over to the - editor, and drop it inside the editor after the te= xt - - - Select - value - and click on this line below "value" - header - - - Click ...= button next to the value field - - - Expand - Managed Beans >= NumberBean - - - - Select - userNumber - value and click - Ok - - - - Switch - Advanced - tab - - - Select - id - and click on this line below "value" - header - - - Type - userNumber - in text field - - - Select - required - and click on this line below "value" - header - - - Click ...= button next to the value field - - - Expand - Enumeration - and select - true - as a value - - -
- Add "required" Attribute - - - - - -
- - - Click - Ok, then click - Finish - - - - Go to Source mode - - - Add the validation attribute to = - <f:validateLongRange> - for user input validation - - - - - -]]> - - - Click - Save - button - - - Again select - Visual - mode - - - On the Palette, click on - commandButton, drag the cursor over to - the editor, and drop it inside the editor after th= e inputText - component. - - - In the editing dialog select - value - and click on this line below "value" - header - - - Click ...= button next to the value field - - - Expand - Resource Bundles &= gt; msg - and select - makeguess_button - as a value - - - Click - Ok - - - - Select - action - and click on this line below "value" - header - - - Type - NumberBean.checkGu= ess - in text field - - - Click - Finish - - - - In Source mode add = - <br/> - tags between = - <outputText> - , <inputText> - and <commandButton> - components to place them on different lines - - - inputnumber.jsp page should look like this: - -<%@ taglib uri=3D"http://java.sun.com/jsf/core" prefix=3D"f" %> - - - - - - - - - -
- -
- - - -
-
- -
-
- - -]]>
-
-
- - Editing success.jsp page - In the same way like inputnumber.jsp, edit success.jsp p= age. Its whole source - should be the next: - -<%@ taglib uri=3D"http://java.sun.com/jsf/core" prefix=3D"f" %> - - - - - - - - - - - - -
-
- -
-
- - - -]]>
- Again you can use code assist provided by JBDS when edit= ing jsp page: -
- Code Assist for <f:param> - - - - - -
- This page, success.jsp, is shown if you correctly guesse= d the number. The - <h:outputFormat> - tag will get the value of success_text from the properties= file. The {0} - in success_text will be substituted for by the value of th= e value attribute within - the <f:param> - tag during runtime. - At the end, you have a button which allows you to replay= the game. The action - value references a backing bean method. In this case, the = method only terminates the - current session so that when you are shown the first page,= the input text box is - clear and a new random number is generated. - - - Switch to Preview mode to see how this page will= look in a browser: - - -
- Success.jsp in Preview Mode - - - - - -
-
-
-
- - Creating index.jsp page - Now you know how to create index.jsp page. - The index.jsp page is the entry point of our application. It= 's just - forwarding to inputnumber.jsp page. - - - Right click - WebContent > New &g= t; JSP File - - - - Type - index - for name field and choose - JSPRedirect - as a template - - - Click - Finish - - - - The source for this page should be like the followin= g: - - - - - - - - - -]]> - Note the .jsf extension of a page. It m= eans that we trigger the - JSF controller servlet to handle the page according the servle= t mapping in the - faces-config.xml file. -
-
- - Running the Application - Finally, we have all the pieces needed to run the applicatio= n. - - - Start up JBoss server by clicking on the - Start - icon in JBoss Server view. (If JBoss is al= ready running, stop it by - clicking on the red icon and then start it again. Afte= r the messages in the - Console tabbed view stop scrolling, JBoss is available= ) - - - Right-click on project - Run AS > Run on Ser= ver - - - - Play with the application by entering correct as wel= l as incorrect - values - - -
- You are Asked to Enter a Number Between 0 and 100</titl= e> - <mediaobject> - <imageobject> - <imagedata fileref=3D"images/rad_jsf_application/rad_j= sf_application_20.png"></imagedata> - </imageobject> - </mediaobject> - </figure> - <figure float=3D"0"> - <title>Your Input is Validated and an Error Message is Display= ed if Invalid Input was - Entered - - - - - -
- -
- After You Enter a Guess, the Application Tells You Whet= her a Smaller or a Larger - Number Should be Tried - - - - - -
- -
- Your Guess is Correct - - - - - -
-
-
- = - = - - - - - - JBoss Developer Studio - Eclipse - Java - JBoss - - - Project Examples - = - JBoss Developer Studio provides an option to download and import a ready-made = - project that you can explore and derive some useful technology impleme= ntation lessons from. - = - - To adjust the settings of the Project Examples feature you need to= navigate to Windows> Preferences > JBoss= Tools > Project Examples = - . - = -
- Project Examples Preferences - - - - - -
- = - The Show experimental sites checkbox serves to enable/disable representing the user sites in the Project Example dialog ( Help > Project Examples). - - = -
- User Sites - - As you can see from the Project Examp= les Preferences image you can add a custom project example that = can be provided by anyone. = - This feature can, for example, facilitate project testing. - = - - - In oder to add a new project example you need to select the User sites - option and press the Add button to the right. - - When the Add button i= s pressed the - Add Project Example Site dialog is displayed. The dialog contains 2 = - input fields: Name wher= e you need to specify the name of the new entry and URL = - that has to point to the xml file that contains example project= (s) properties. = - In more detail the structure of the xml file is discussed furth= er in the chapter of the guide. - Alternatively, if the xml is stored on your local machine, you = can hit the Browse button to select = the file in the file system. - Here is an example of the xml file that holds project examp= le settings: - = - - - User Examples - User Project Example - - Short project description. - - - Full project description. - - 10900 - - http://projectexample.org/projectexample.zip - - - -]]> = - = - Once you define the location of the xml file with projects s= ettings you will see a new user site entry added. = - Please note now if you select the entry you can edit and remo= ve it with the corresponding buttons to the right. = - You can not do such operations with the Plugin provides sites. - = - When the user sites location is set up you can download and = install the project(s). = - Please see the next chapter of the guide. -
- = - = - = -
- Downloading a Project Example - = - To download a project example and start working with it you= need to take a few steps: - - - Go to the menu bar and select File > New > Other... - - = - Select J= boss Tools > Project Examples (You can also call the Project Examples from menu b= ar: Help > Project Examples... or directly from File > New > Exampl= e... menu ) - = - = - - = -
- Project Examples - - - - - -
- = - - Alternatively, you should navigate to New > Other.., scroll down to find the JBoss Tools option (or just type in the first letters = of the word "JBoss" for quick search), expand the option and select Project Examples, click Next. - - - Now in the New Pro= ject Example dialog you can select a project you would like to e= xplore and a site to download it from - Project Examples Wizard provides a filter field to = more easily locate the project examples you want, so you can type in the pr= oject you would like to explore in the field. - = - - = - = -
- Selecting a Project Example - - - - - -
- = - If you have previously specified user sites (see the User Sites chapter) they also will be displaye= d in the list of project examples in the category that was defined in the = xml file with user sites settings. -
- User Site - - - - - -
- = - - Pleas note that to view the user sites you need to have Show experimental sites checked. - - = - - Note: - - The Show the Quick F= ix Dialog option is described in the Quick Fixes section. - - - = - - Press Fi= nish to start downloading the project from the reposi= tory - - = - - = - When downloading is finished the project will be imported au= tomatically and you will be able to see it in the Package Explorer. - = - Now you can run the application on the server. - = - - = - = -
- Seam Demo Application run on the Server - - - - - -
- -
- = -
- Quick Fixes - - Project Examples Wizard has an option for making quick fixes = - for the imported project to easily fix possible issues like m= issing servers, Seam runtimes etc. - - To enable quick fixing option you need to check the - Show the Quick Fix dialo= g while choosing the Project Example. - = - When the project you selected is downloaded it will be check= ed for missing dependences and if there are some you will see a dialog list= ing the problems. -
- Quick Fix Dialog box - - - - - -
- To fix the problem you need to: - = - - Select the problem from the list - Click Qu= ick Fix button - - = - You will be offered a solution or a number of solutions to t= he problem. - = -
- Quick Fix Dialog box: Selecting a Fix - - - - - -
- In this case(see the image above), when the Finish button is pressed, Seam = Settings dialog box will be displayed where you need to provide a path to t= he Seam environment to fix the issue. - = - When the problem is fixed you will be returned to the Quick = Fix dialog box with the remaining problems to be fixed. - = -
- = - = -
- - = - - - - - - JBoss Developer Studio - Eclipse - Java - JBoss - - - FAQ - - For more information on JBoss Develo= per Studio features, refer to the - following FAQ to get the answers on the most "popular" questions.<= /para> - -
- What should I do if Visual Page Editor does not start under= Linux - - Linux users may need to do the following to get the Visual Page - Editor to work correctly on their machines. - - - - On Red Hat based Linux distributions install the xpL= ib.i386 package - - - Type - - - - and/or use - - - - Open the JBDS perspective. If you see the Help view = open, close it and restart - JBDS - - If it doesn't help and you use Fedora Core Li= nux and Eclipse Version: 3.4.1,the issue can be produced because libswt-xul= runner-gtk-3449.so file doesn't present - in eclipse-swt-3.4.1-5.fc10.x86_64.rpm/eclipse/plugins/org= .eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar.To add this file to eclipse = you should: = - - - - Decompress eclipse/plugins/org.eclipse.swt.gtk.l= inux.x86_3.4.1.v3449c.jar form eclipse-SDK-3.4.1-linux-gtk-x86_64.tar.gz - = - - Copy libswt-xulrunne= r-gtk-3449.so file to your Fedora Eclipse location. - = - = - - Open the file eclipse.ini,which can be found in = your Fedora Eclipse location and add the following line: - = ,where /usr/lib/eclipse is the path= to your eclipse folder. - = - - - - If none of these work, do the following: - - - Clear the Eclipse log file, - <workspace>\.metadata\.log= - - - Start Eclipse with the -debug option: - - - - Post the Eclipse log file - (<workspace>\.metadata\.lo= g) on - the forums. - - - - -
- -
- Do I need to have JBoss Server installed to run JBoss Devel= oper Studio? - - No. JBoss Developer Studio already comes bundled with JBoss - Server. We bundle it together so that you don't need to downlo= ad any additional - software and can test your application in a Web browser right = away. - If you want to use a different JBoss server installation, af= ter JBoss - Developer Studio is installed open Servers View= (select - Window > Show= View > Others > Server - > Servers), then right click = on this - view > New > Server - and follow the wizards steps to point to another J= boss Server - installation. - JBoss Developer Studio works with any servlet container, not just - JBoss. For more information on deployment, please see the Depl= oying Your Application - section. -
- -
- I have an existing Seam 1.2.1 project. Can I migrate/import= the project to a JBDS - Seam project? - - We highly recommend you to create Seam 1.2.1 project using t= he - JBDS. In other case= try to do manually: - - - - Create a Seam Web project to get the JBoss tools str= ucture - - - Then from your Seam 1.2.1 seam-gen project start doing the f= ollowing: - - - Copy src to <= property moreinfo=3D"none">src - - - Copy view to = Web content - - - Copy resources individual files to where they are in= the seam web project - etc. - - - -
-
- I have an existing Struts or JSF project. Can I open the pr= oject in JBDS? - - Yes. From main menu select - File > Import > Other &g= t; JSF Project (or Struts - Project) - and follow wizards steps. - -
- -
- Can I import a .war file? - - Yes. Select File > = Import > Web > WAR - file, then follow importing ste= ps. -
- -
- Is it possible to increase the performance of Eclipse after= installing your - product? - - JBoss 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 e= xample: - - -
- -
- How can I add my own tag library to the JBoss Tools Palette= ? - - See Adding Tag - Libraries in Visual Web Tools Guide. -
- -
- How to get Code Assist for Seam specific resources in an ex= ternally generated - project? - - To get Code Assist for Seam specific resources in an externa= lly generated project, you - should enable Seam features in Project Preferences. Right clic= k an imported project and - navigate - Properties > Seam Settings<= /property>. Check - Seam support - box to enable all available Seam - Settings. -
- -
- How to import an example Seam project from jboss-eap direct= ory? - - To import an example Seam project from - jboss-eap - into your working directory, you should perform th= e following steps: - - - - Go to - New > Other > Ja= va Project from Existing Buildfile - - - - - Point to the - build.xml - of any chosen project by pressing - Browse - button - - - - Hit - Finish - to open the project - - - - As these seam examples are non WTP projects, next you should= enable Seam support for - them. To do that, right click the project and go to - Properties > Seam Settings<= /property>. -
- -
- Is a cross-platform project import possible for JBDS?</titl= e> - - <para>Yes. You can easily import created in Linux JSF, Struts or S= eam project to Windows and - vice versa.</para> - - <para>To do the transferring JSF, Struts or Seam project, go to <e= mphasis> - <property moreinfo=3D"none">Menu > Import > General = > Existing Projects into Workspace</property>,</emphasis> - select the folder where your project stored and press <emphasi= s> - <property moreinfo=3D"none">Finish</property>.</emphasis><= /para> - </section> -</chapter> - - = -<chapter id=3D"further_reading" xml:base=3D"file:///home/ochikvina/WORK/fo= r_compare/jbosstools-3.1.0.CR1/documentation/guides/GettingStartedGuide/en/= modules/further_reading.xml" xreflabel=3D"further_reading"> - <?dbhtml filename=3D"further_reading.html"?> - <chapterinfo> - <keywordset> - <keyword>JBoss Developer Studio</keyword> - <keyword>Eclipse</keyword> - <keyword>Deploy</keyword> - <keyword>Deployment</keyword> - <keyword>JBoss</keyword> - </keywordset> - </chapterinfo> - - <title>Further Reading - - = - - - Seam Dev Tools Reference Guide - (html) - - This guide helps you to understand what Seam is and how to inst= all Seam plug-in into - Eclipse. It tells you the necessary steps to start working with Seam= Framework and assists in a - simple Seam Project creation. Also you will learn how to create and = run the CRUD Database - Application with Seam as well as find out what Seam Editors Features= and Seam Components are. - - = - - - Visual Web Tools Reference Guide - (html) provi= des general orientation and an overview of JBDS visual web tools functional= ity. This guide discusses the following topics: editors, palette, web prope= rties view, openOn, content assist, RichFaces support. = - - - = - - - JBoss Server Manager Reference Guide - (html) - - This guide covers the basics of working with the JBoss server m= anager. You will read how to - install runtimes and servers and quickly learn how to configure, sta= rt, stop the server and know - how deployment and archiving process. You will find out how to manag= e installed JBoss Servers - via JBoss AS Perspective. You will also read how to deploy modules o= nto the server. - - = - - - jBPM Tools Reference Guide - (html) - - With jBPM Tools Reference Guide we'll help you to facilitate a c= ross-product - learning and know how you can speed your development using special e= ditors and visual designers. - We'll also guide you through the steps on how to create a simple pro= cess and test it - within jBPM jPDL perspective. - - = - - - Hibernate Tools Reference Guide - (html) - - Throughout this guide you will learn how to install and use Hibe= rnate Tools bath via Ant and - through Eclipse. We'll supply you with the information on how to cre= ate mapping files, - configuration file as well as a file for controlling reverse enginee= ring by using specific - wizards that Hibernate tooling provides. Also you will know about Co= de Generation and - peculiarities of work within Hibernate Console Perspective. - - = - - - ESB Editor Reference Guide - (html) - - This guide provides you with the information on ESB Editor and a= ll necessary wizards for ESB - files development. - - = - - - JBoss Portal Tools Reference Guide - (html) - - The guide gives a detail look at how you can easily build a Port= let Web Application with - JBoss Tools and deploy it onto JBoss Portal. - - = - - - JBoss WS User Guide - (html) - - This guide gives you practical help on JBossWS usage. You will l= earn how to create a web service using JBossWS runtime, find out how to cre= ate a web service client from a WSDL document using JBoss WS and also see h= ow to set your development environment. - - = - - - Smooks Tools Reference Guide - (html) - - This guide is packed with useful and easy-to-understand informat= ion about graphical, configuration and source editor pages. - - = - - - Drools Tools Reference Guide - (= html) - - The guide help you to discover how to create a new Drools projec= t, use debugging rules and work with different editors. - - = - - - JMX Tools Reference Guide - (html) - - With the help of this guide you'll explore the best practices to= follow when working with MBean Explorer, MBean Editor, Connections and etc= . - - = - - - Eclipse Guvnor Tools Reference Guide - (= html) - - The purpose of this guide is to describe briefly the functionali= ty present in the Eclipse Guvnor Tools (EGT) for Drools 5. - - = - = - = - - - JSF Tools Tutorial - (html)<= /ulink> - - This tutorial will describe how to deal with classic/old style of= JSF development and how - to create a simple JSF application using the JBoss Developer Studio. <= /para> - - = - - JSF Tools Reference Guide - (html)= - = - - From this guide you'll discover all peculiarities of work at a = JSF project. You'll - learn all shades that cover the process of project creation and take= a closer look at the JSF - configuration file. Also you'll get to know managed beans and how to= work with them and - find out, how to create and register a custom converter, custom vali= dator and referenced beans - in a JSF project. - - = - - Struts Tools Reference Guide - (ht= ml) - - In Struts Tools Reference Guide you will learn how to create and = work with a new struts - project. This guide also provides information about graphical editor f= or struts configuration - files, tiles files, and struts validation files. - - - - - Struts Tools Tutorial - (htm= l) - - This tutorial will describe the classical style of Struts develop= ment, and will - step-by-step show you how to create a simple Struts application in JBoss= Developer Studio. - - - - = - - Exadel Studio Migration Guide - (html) - - This document is intended to help you to migrate an existing Exade= l JSF or Struts projects - from Exadel Studio into JBoss Developer Studio. - - = - If there's anything we didn't cover in this guide, please feel fre= e to visit our JBoss Developer Studio Users Forum or= JBoss Tools Users Forum to ask questions. There we = are also looking for - your suggestions and comments. - - - - = - - +]> + + Getting Started with JBoss Developer Studio + = + + 2007 + 2008 + 2009 + 2010 + JBoss by Red Hat + + Version: 3.0.0.GA + + + + PDF version + + + + = + + = + + + + + + + + + JBoss Developer Studio + Eclipse + Java + JBoss + + + Getting Started with JBoss Developer Studio + +
+ What is JBDS? + JBoss Developer Studio is a= set of eclipse-based development tools that + are pre-configured for JBoss Enterprise Middleware Platforms and Red Ha= t Enterprise Linux. + Developers are not required to use JBoss De= veloper Studio to develop on + JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these = pre-configured tools offer + significant time-savings and value, making them more productive and spe= eding time to deployment. + This guide covers the first steps to get started working with JBoss Developer + Studio. You will learn how to install and configure necessa= ry software for your OS + (currently Linux, Microsoft Windows or Mac OSX). + Thus this guide will provide you with detailed info on how to star= t JDK, JBDS and JBoss + Tools. +
+ +
+ Key Features of JBoss Developer Studio and Requirements + For a start, we propose you to look through the table of main featu= res of JBoss Developer Studio: + + + = + Key Functionality of JBoss Developer Studio + + = + + + = + = + + + Feature + Benefit + = + + + = + + = + + JBoss Enterprise Application Platform + JBoss Developer Studio includes and integrates JBoss Ent= erprise Application Platform, the same version of the middleware platform t= hat Red Hat supports in production for 5 years. + + = + + New Seam Tools + JBoss Developer Studio includes brand new tools for Seam= . They provide wizards for creating new Seam projects, validation tools, ex= pression language code completion, testing tools, and wizards for generatin= g entity objects. + + = + + Visual Page Editor + JBoss Developer Studio includes a Visual Page Editor for= combined visual and source editing of Web pages. The Visual Page Editor ev= en renders AJAX-enabled RichFaces components. + + = + + AJAX Capabilities + JBoss Developer Studio includes a Technology Preview of = JBoss RichFaces. RichFaces provides nearly 70 skinnable components, includi= ng calendar, tree, dropdown menu, drag-and-drop components, and more. JBoss= Developer Studio=E2=80=99s Visual Page Editor can render RichFaces compone= nts. + + = + + JBoss Tools Palette + The JBoss Tools Palette contains a developer=E2=80=99s p= roject tag libraries and enables inserting tags into a JSP with one click. = The Tools Palette supports custom and 3rd party tags. + + = + + JBoss jBPM Tools + JBoss Developer Studio includes jBPM tooling for definin= g Seam page flows. + + = + + Spring Tools + JBoss Developer Studio includes Spring IDE for developin= g Spring applications. + + = + + Struts Tools + JBoss Developer Studio includes Struts tools for Struts = 1.x applications. + + = + + Optimized JBoss Application Server adapter + JBoss Developer Studio=E2=80=99s advanced JBoss AS adapt= er includes features like incremental deployment for fast development and i= s pre-configured for the included JBoss Application server. + + = + + Red Hat Enterprise Linux and RHN Access + JBoss Developer Studio includes access to Red Hat Enterp= rise Linux, Linux development tools, and Red Hat Network for development pu= rposes. + + = + + Project Examples + Tooling for easy installation of Examples. + + = + + JBossWeb Service + JBoss WS is a web service framework developed as a part = of the JBoss Application Server. It implements the JAX-WS specification tha= t defines a programming model and run-time architecture for implementing we= b services in Java, targeted at the Java Platform, Enterprise Edition 5 (Ja= va EE 5). + + + +
+ = + JBDS requires JDK 5+ (JDK 6 = in case of EAP 5.0). Also it's important that = + the JVM's architecture matches the particular JBDS build, i.e. if you're on a = + 64-bit system and use the 64-bit JVM, you need the 64-bit JBDS. + = + For the 32-bit version of JBDS use the 32-bit JVM or just use -vm flag to = + tell JBDS to use 32-bit java if the 64-bit one is found as the default. + = + + Note: + On Linux system with 64-bit JVM the visual editor may fail to star= t. In this case you need the libstdc++.so.5 library. + See also the FAQ. + +
+ = +
+ + Configuring Your Java Environment + You must have a working installation of JDK before you install JBoss Developer + Studio. Thus in this + guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux P= latform and Microsoft + Windows Platform. + +
+ Installing and Configuring 32-bit Sun JDK 5.0 on Linux + To install 32-bit Sun JDK 5.0 on Linux and configure it, you shou= ld follow the next steps: + + + Download the Sun JDK 5.0 + (Java 2 Development Kit) from Sun's website. Choose "JDK 5.= 0 Update + <x>" (where "x" is the latest update number) for + download and then select "Red Hat Package Manager in self-extracting= " file + for Linux. Read the instructions on Sun's website for installing the= JDK. + + + If you don't want to use SysV service scripts you can install t= he + "self-extracting file" for Linux instead of choosing the "RPM in + self-extracting" file. In that case you can skip the next step menti= oned here. But it + is recommended to use the SysV service scripts for production server= s. + + + Download and install the appropriate -compat RPM from JPackage = here. + Please ensure you choose a matching version of the -compat package t= o the JDK you've + installed. + + + Create an environment variable that points to the JDK installat= ion directory and call it + JAVA_HOME. Add + $JAVA_HOME/bin + to the system path to be able to run java from the comma= nd line. You can do this + by adding the following lines to the .bashrc file in your home direc= tory. + + + + + + Note: + + =EF=BB=BFIf you have JDK already installed and added in your sys= tem path, you should add + $JAVA_HOME/bin before the old $PATH (not after it) + so that the new version of JDK can be found first, i. e. + export PATH=3D$JAVA_HOME/bin:$PATH + 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. + + + Set this variable for your account doing the installation and als= o for the user account + that will run the server. + + + If you have more than one version of JVM installed on your mach= ine, make sure you are + using the JDK 1.5 installation as the default java and javac. You ca= n do this using the + alternatives system. The alternatives system allows different versio= ns of Java from different + sources to co-exist on your system. + + +
+ Select alternatives for java, javac and java_sdk_1.5.0 + + + As a root user, type the following command at the shell prompt= and you should see + something like this: + + + + Make sure the Sun version [jre-1.5.0-sun in this case] is select= ed (marked with a + '+' in the output), or select it by entering its number as prompted.<= /para> + + + Repeat the same for javac and java_sdk_1.5.0. + + + + You should verify that java, javac and java_sdk_1.5.0 all point = to the same manufacturer + and version. + + Note: + You can always override this step by setting the JAVA_HOME envi= ronment variable as + explained in the previous step. + + + + Make sure that the java executable is in your path and that yo= u are using an appropriate + version. To verify your Java environment, type "java -version" at t= he shell + prompt and you should see something like this: + + + +
+ +
+
+ Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windo= ws + + To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows,= follow these steps: + + + Download the Sun JDK 5.0 + (Java 2 Development Kit) 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 th= e installation. + + + Create an environment variable called JAVA_HOME that points to = the JDK installation + directory, for example: + C:\Program Files\Java\jdk1.5.0_11\ + + + + + In order to run java from the command line, add the jre= \bin directory + to your path, for example: + + C:\Program Files\Java\jdk1.5.0_11\jre\bin + + 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. + Now, when 32-bit Sun JDK 5.0 has been successfully installed, we = can pass on to the next + step. +
+ +
+ +
+ + JBoss Developer Studio Installation + + This chapter will provide you with detailed information on how to = install JBoss + Developer Studio. + + JBDS comes with a simple installer, bundled with tested/pre-config= ured versions of Eclipse, + WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next ste= ps: + + + + First of all you need the appropriate installation file for your= platform from = + Red Hat + website. + + + Then run in console: + + + + Follow the instructions presented by the installation wizard: + + + +
+ JBoss Developer Studio Installation Wizard + + + <= /imagedata> + + +
+ + + + Provide the installation path + + + Select Java VM + + + +
+ Select Java VM + + + <= /imagedata> + + +
+ + + Tip: + By selecting + Default Java VM + you set default Java VM of your system (to verify your Jav= a environment, type + "java -version" in console). + + + Selecting + Specific Java VM + you can provide the path to non-default Java VM. + + + Note: + JBoss Developer Studio needs Java 5 and "gij" isn't available on + every platform. + + + + + Installation process includes JBoss Enterprise Application + Platform. Select + Yes to use it in= JBoss Developer Studio. + + Note: + JBDS 2.0.0.GA comes integrated with JBoss EAP 4.3, while the c= urrent 2.1.0.GA release of JBDS comes with JBoss EAP 5 that support EAP 5 a= dapter + and Seam 2.2. + + = + This step lets you configure locally available JBoss Applicatio= n Servers: = + + + +
+ JBoss Enterprise Application Platform Installing + + + <= /imagedata> + + +
+ + + You can fill the list automatically using the <= property moreinfo=3D"none">Find button: click Find, select a folder = where search of available JBoss Application Servers should be started and c= lick on Ok: + + = +
+ Finding Servers in the Selected Directory + + + + + +
+ + = + + All available servers in the selected directory will = be added to the list with the following information specified: Name, Type, = Version and Location. = + + + = + + You can also add servers one by one using the Add button: + + + = +
+ Add Server to be Configured + + + + + +
+ + +Click on Browse and select the server location. Fields Name, Type and Version will = be filled in automatically: + = +
+ Specify Server Location + + + + + +
+ + = + = + Click on Ok. The server is added to the list with the details on its type, versio= n and location. + = + = + = + The Remove button will the remove the selected server from the list. If necessary= , you can edit the server details clicking on the Edit button: + = +
+ Edit Server + + + + + +
+ + = + = + = + + + + + Click Next. Check your installation paths and see the components to install. If= you'd like to change + something, press the + Previous + button. Click + Next + to start installation. + + + + + +
+ Summary Information + + + <= /imagedata> + + +
+ +
+ +
+ + JBoss Developer Studio and JBoss Tools + + This section uncovers the points on the differences between JBoss Developer + Studio and JBoss Tools and provides the steps on JBoss + Tools installation as well. + +
+ What is the difference? + + JBoss Tools is what went i= nto our JBoss Developer + Studio which comes as an easy-to-install Eclipse based IDE = fully configured and ready + to run with the bundled JBoss Enterprise A= pplication Platform. + + In short JBoss Tools are j= ust a set of Eclipse plugins and + JBoss Developer Studio adds: + + + An installer + + + Eclipse and Web Tools preconfigured + + + JBoss EAP with JBoss AS and Seam preconfigured + + + 3rd party plugins bundled and configured + + + Access to RHEL and Red Hat Network + + + Access to the JBoss/Red Hat supported software + + + For additional information see JBoss.com +
+ +
+ JBoss Tools Installation and Update + Here, let's consider the installation of the JBoss Tools + modules. + JBoss Tools is an umbrella= project for the JBoss developed plugins + that will make it into JBoss Developer Stu= dio. The JBoss Tools modules are: + + + JBoss AS Tools + + + Seam Tools + + + Hibernate Tools + + + Visual Page Editor + + + JST Tools + + + JBPM Tools + + + + To install the JBoss Tools plugins for Eclipse, you need the foll= owing: + + + + Get Eclipse and Web Tools (make sure you have the = + appropriate version of Ecl= ipse) + + + The current version of JBoss Tools (3.1.M2) targets at Eclipse 3.= 5/Galileo which is available from eclipse.org + + + Tip: + We recommend you do not use Eclipse.org update site to go from o= ld version of Eclipse to new one. + Instead we suggest that you download the full binary from here. + + + If you can only use Eclipse 3.3 use JBoss Tools 2.1.2, but + JBoss Tools 2.x will not have any of the new features. + + + Note: + Remember to choose the download that matches your OS and use Jav= a 5 when you run + it. + + + + + Get the latest JBoss Tools build + + + + Some of our newer plugins, like TPTP and BIRT, need additional dr= ivers. On the left side of + the download page you can find all of the required drivers for chosen = build and their versions. + If you need to install an= y standalone plug-in from JBoss Tools visit a = JBoss Tools Wiki page to read + about dependencies between standalone plug-ins. = +
+ <diffmk:wrapper diffmk:change=3D"added"= >Installation From Update Site</diffmk:wrapper> + = + = + I= nstead of downloading installation/updating manually, it's also possible to + get the latest release of JBoss Tools from one = of our update sites: = + + + Stable Updates: http://download.jboss.org/jbosstools/updates/stable + + + Development Updates: http://download.jboss.org/jbosstools/update= s/development + + + Nightly Builds: http://download.jboss.org/jbosstools/updates/night= ly/trunk/ + + + + + To = install/update Jboss Tools from one of the update sites you should follow t= he steps: + First, download= the correct version of Eclipse = + for your platform which is compatible with the version of JBoss + Tools you plan to install.For example if you want to install + 3.1.0.GA Eclipse 3.5 is required. + If you do not already have Java 5 or 6 insta= lled and in your path, + download and install it. + When Eclipse is started, go to + Help->Software Updates... ->Available Software->Manage S= ites...->Add...(Eclipse 3.4) + Help->Install New Software->Add..(Eclipse 3.5= ) + + + After clicking Add button Add Site View should appear. + In the Location field you should paste one of= the update sites described + above.In Name you can writ= e any name you like. + In the end press the Ok button. +
+ <diffmk:wrapper diffmk:change=3D"changed">Add Update Site</diffm= k:wrapper> + + + + + +
+
+ In the = Install View select features to install, then click Next= . +
+ <diffmk:wrapper diffmk:change=3D"added">= Jboss Tools installation</diffmk:wrapper> + + + + + +
+
+ If Jboss Tools are already installed on you= r Eclipse and you are doing updating but not = + installation the following messages will appear in your = Details= section. + Ignore them and press Next.<= /para> +
+ <diffmk:wrapper diffmk:change=3D"added">= Possible messages</diffmk:wrapper> + + + + + +
+
+ When you click Finish the prosses of Installation/Updating starts = up. + Install. Restart when prompted. +
+ <diffmk:wrapper diffmk:change=3D"changed">Message dialog</diffmk= :wrapper> + + + + + +
= +
+ After fetching all the features and plugins = for installation, + you may be prompted that your selection contains unsigned jars. + This is normal,simply accept the warning and continue. = +
+ <diffmk:wrapper diffmk:change=3D"added">= Warning Message</diffmk:wrapper> + + + + + +
= +
+
+ + + Note: + While installing JBoss Tools on GNU/Linux (64-bit) through the ec= lipse installation manager you may run into some problems which can interru= pt your installation process. + Please, read the = + Manual installation of JBoss Tool= s 3.1.x on Eclipse 3.5 on GNU/Linux (64-bit) = + wiki article which provides you with the necessary steps to do it corr= ect. + +
+
+ <diffmk:wrapper diffmk:change=3D"added">I= nstallation From Zip file</diffmk:wrapper> + Y= ou can download Jboss tools in a zip file from one of the pages below: + + + = Stable Releases: http://www.jboss.org/tools/download/stable.html= + + + = Development Updates: http://www.jboss.org/tools/download/dev.html + + + = Nightly Builds: http://download.jboss.org/jbosstools/updates/nightly/ + + + Wh= en you downloaded Jboss Tools Zip please DO NOT UNZIP IT and follo= w the steps described below: + + When Eclipse is started, go to Help -> Install New Software... -> Add... ->= Archive... + Browse for the update site zip.In the Name field you can write any name you like. + In the end press Ok<= /property> button.= +
+ <diffmk:wrapper diffmk:change=3D"added"= >Installation from a zip file</diffmk:wrapper> + + + + + +
= +
+ All the other steps are the same as it was = described in the + Installation From Update Site section. + = +
+ = +
+ = +
+
+ +
+ Welcome to JBoss Developer Studio + In this section we'll show you how to work with the welcome page o= f the JBoss + Developer Studio. + The welcome page is the first page you see when you first launch <= property moreinfo=3D"none">JBoss Developer + Studio. + +
+ Welcome to JBoss Developer Studio + + + <= /imagedata> + + +
+ + With the help of its page you will be able: + + + to get quick access to Getting Started Documentation (guides, tu= torials and + viewlets) + + + +
+ Getting Started Documentation + + + <= /imagedata> + + +
+ + + + to create new Seam projects, jBPM Process, JSF or Struts project= s using JBDS + wizards + + + +
+ Create New... + + + <= /imagedata> + + +
+ + + + to get short description of perspectives that JBDS offers for mo= re productive + development + + + +
+ Perspectives + + + <= /imagedata> + + +
+ + + + to visit JBoss Developer Studio web resources. + + + +
+ Web Resources + + + + + +
+ + Start work with JBoss Developer Studio= by clicking on + Workbench + button or simply close the Welcome page. + +
+ +
+ + Upgrading + To upgrade, of course you can uninstall your current version and i= nstall the new one. + Now it's possible to upgrade from JBDS 2.0 to 2.1 using the update= site which is available at = + h= ttp://devstudio.jboss.com/updates/2.1. = + This is described more fully in the JBDS Update Guide. + + <diffmk:wrapper diffmk:change=3D"added">= Note:</diffmk:wrapper> + Y= ou CAN = NOT upgrade from 2.1 to 3.0 using update site because of some platform = change.Full installation is required. + +
+ +
+ + Uninstalling + + + Make sure JBoss Developer Studio is not running + + + Uninstall your current version of JB= oss Developer Studio by running + Uninstaller + + +
+ +
+ + Support + If you have comments or questions, you can discuss them at our = + JBoss + Developer Studio Forum. + When writing to the forum for questions, please include the follow= ing information: + + + JBoss Developer Studio version + + + Exact error message + + + Steps to reproduce the issue + + + + JBDS subscribers can get ne= cessary support on our Support Portal. +
+ + +
+ + Other relevant resources on the topic + JBDS on RedHat: JBoss Developer + Studio + Forum: JBoss + Forum + + Wiki: JBo= ssToolsWiki = + = + Subscription: JBDS + Subscription + = + The latest documentation builds are available here. + = + + Matrix of supported platforms= , runtimes and technologies in JBossTools/JBDS +
+ +
+ + = + + + + + JBoss Developer Studio + Eclipse + Deploy + Deployment + JBoss + + + + Manage JBoss AS from JBoss Developer Studio + + In this chapter we'll focus more on how to operate the JBoss + AS from JBoss Developer= Studio. + JBoss Developer Studio 2.1.0.GA is shipped with JBoss EAP 5 + . When you followed the default installation of JBoss + Developer Studio, you should already have a JBoss E= AP 5 Server installed and + defined. To run JBoss AS you need JDK 1.5, JDK 6 is not formally s= upported yet, although + you may be able to start the server with it. + +
+ + How to Manage the JBoss AS Bundled in JBDS + This section covers the basics of working with the JBoss Server + supported directly by JBDS via bundled AS plug-in. The server points to = + the JBoss Enterprise Application Platform 5.0 Runtime shipped = with JBDS. + = +
+ JBoss EAP 5.0 Runtime + + + + + +
+ = + To read more about AS plug-in, refer to the Server Manager guide. +
+ + Starting JBoss Server + Starting JBoss Server is quite simple. JBoss + Developer Studio allows you to control its = behaviour with the help of + a special toolbar, where you could start it in a regular o= r debug mode, stop it or + restart it. + + + + To launch the server click the green-with-white-= arrow icon on the + JBoss Server View = or right click server name in + this view and select + Start + . If this view is not open, select + Window > Show V= iew > Other > Server + > JBoss Server View + + + +
+ Starting from Icon + + + = + + +
+ + While launching, server output is written to the Console + view: + +
+ Console Output + + + = + + +
+ When the server is started you should see + Started + in the square brackets right next its name in = JBoss Server + View. + +
+ Server is Started + + + = + + +
+ +
+ +
+ + Stopping JBoss Server + To stop the server, click the + Stop + icon in JBoss Serv= er View or right click the server + name and press + Stop. + +
+ Stopping Server + + + = + + +
+ When the server is stopped you will see + Stopped + in the square brackets next to its name. +
+
+ + Server Container Preferences + You can control how JBoss De= veloper Studio interacts with + server containers in the Serve= r editor. Double-click the server + to open it in the editor. + +
+ Server Overview + + + = + + +
+ + Here you can specify some common settings: host name, se= rver name, runtime as well + as settings related to the publishing, timeouts and server= ports. + +
+
+ +
+ + How to Use Your Own JBoss AS Instance with JBDS + Although JBoss Developer Studio<= /property> works closely with + JBoss EAP 5 we do n= ot ultimately tie you to any particular + server for deployment. There are some servers that Studio supp= orts directly (via the + bundled Eclipse WTP plug-ins). In this section we discuss how = to manage self-installed + JBoss AS. Suppose you want to deploy the application to JBoss 4.2.3 + server. First of all you need to install it. +
+ + JBoss AS Installation + + + Download the binary package of JBoss AS, e.g. JBoss 4.2.3 and save + it on your computer: http://labs.jboss.com/jbossas/downloads + + + It does not matter where on your system you install JBos= s server. + + + Note: + The installation of JBoss server into a directory th= at has a name containing + spaces provokes problems in some situations with Sun-b= ased VMs. Try to avoid + using installation folders that have spaces in their n= ames. + + + There is no requirement for root access to run JBoss Ser= ver on UNIX/Linux systems + because none of the default ports are within the 0-1023 pr= ivileged port + range. + + + After you have the binary archive you want to in= stall, use the JDK jar + tool (or any other ZIP extraction tool) to extract= the jboss-4.2.3.GA.zip + archive contents into a location of your choice. T= he jboss-4.2.3.GA.tgz + archive is a gzipped tar file that requires a gnut= ar compatible tar which + can handle the long pathnames in the archive. The = extraction process will + create a jboss-4.2.3.GA directory. + + +
+ +
+ + Adding and Configuring JBoss Server + Now we should add just installed server into server mana= ger in JBoss + Developer Studio. + + + Open the JBoss Serve= r View by selecting + Window > Show V= iew > Other > Server + > JBoss Server View + + + + Right click anywhere in this view and select + New Server + + + + Select + JBoss Community &g= t; JBoss 4.2 Server + + + +
+ Selecting Server Name and Server Type + + + = + + +
+ + + Note: + + Now in the New Server wi= zard there is a separation + between the .org servers (the + JBoss Community + category) and product server that comes bu= ndled with JBoss EAP (the + + JBoss Enterprise Middl= eware category). + + + + + To create a new runtime, which Jboss AS 4.2 matc= hes to, click + Next + + + + + + + In the next step make JBoss Developer Studio to know + where you have installed the Server and define JRE= . + + +
+ Defining JBoss Runtime + + + + + +
+ + Note: + When adding a new server you will need to specify wh= at JRE to use. It is + important to set this value to a full JDK, not JRE. Ag= ain, you need a full JDK + to run Web applications, JRE will not be enough. + + + + + In the next dialog verify the specified informat= ion and if something is + unfair go back and correct it + + +
+ JBoss Runtime Summary + + + + + +
+ + + In the last wizard's dialog modify the projects = that are + configured on the server and click + Finish + . + + +
+ Configuring Projects + + + + + +
+ A new JBoss Server should now appear in the JBoss + Server view. +
+ New JBoss Server + + + + + +
+ Now, we are ready to create the first web application. +
+ +
+
+ = + = + + + + + JBoss Developer Studio + Seam + JBoss + + + + Write Your First Project with JBoss Developer Studio + + This chapter is a set of hands-on labs. You get step-by-step infor= mation about how the JBoss + Developer Studio can be used during the development process. + +
+ Create a Seam Application + + In this section you get to know how to create a Seam project in = JBDS, how to start the + server and what a structure your project has after creating. + +
+ Start Development Database + + Before opening the JBoss Developer studio you need to download and start a Workshop = Database. + To start the database just run ./r= unDBServer.sh or + runDBServer.bat from the = database directory. + The end result should be a console window that looks like: + +
+ Starting DataBase + + + + + +
+ +
+ +
+ Create and deploy Seam Web Project + + Minimize the terminal window and run the JBoss Developer Studio + from Applications Menu or from the desktop icon. + First of all you get the Workspace Launcher. Change the defaul= t workspace location if + it's needed. Click on Ok. <= /para> + +
+ Workspace Launcher Dialog + + + + + +
+ + After startup, you see the welcome page. You could read how to= work with welcome pages + in previous chapter. Now select <= property moreinfo=3D"none">Create + New... icon and then press on Create Seam Project + link. + + The New Seam Project wizard is started. You need to enter a name + (e.g., "workshop") and a location directory for your new project. = The + wizard has an option for selecting the actual Server (and not just= WTP runtime) that will be + used for the project. This allows the wizard to correctly identify= where the needed + datasource and driver libraries need to go. + +
+ New Seam Project Wizard + + + + + +
+ + All settings are already specified here, you can just modify t= he Configuration. Click on + the + Modify... + button to configure your custom facets pattern: + + +
+ Project Facets Specifying + + + + + +
+ + On the whole the dialog allows to select the "features" you wa= nt to use in your project. + Doing this JBoss Developer Studio setups the appropriate tooling for + your project. Since JBoss Seam integrates all popular Java EE fram= eworks, you can select any + combination of technologies from the list. Here, for the default c= onfiguration, Dynamic Web + Module, Java, JavaServer Faces (JSF), and Seam Facet are already s= elected for a typical + database-driven web application. The default project facets should= suffice. + + In the Project Facets f= orm you can also bring up server runtimes + panel by clicking Runtimes= tab on the right corner. This panel shows + available server runtimes. + +
+ Runtimes Selecting + + + + + +
+ + Click on + Ok + and then + Next + to proceed further. + + A dynamic web application contains both web pages and Java cod= e. The wizard will ask you + where you want to put those files. You can just leave the default = values or choose another + folder. + +
+ Web Module Settings + + + + + +
+ + On the next form, you will be able to select where those libra= ry JARs come from. The + easiest is just to select the JARs provided by the JBoss AS runtim= e associated with this + project. That is why it is important to chose the right JBoss AS 4= .2 runtime in the project + setup window. + + + Check + Server Supplied JSF Implementati= on + . We will use JSF + implementation that comes with JBoss server + + + Click + Next + + + + +
+ JSF Capabilities Adding + + + + + +
+ + Next wizard step needs more settings that previous. Let's star= t with + General section. + Leave the default Seam runtime and check a WAR deployment. + +
+ Seam Facet Setting + + + + + +
+ + Next Database section i= s a little tricky. The Connection + Profile needs to be edited so that the new project wo= rks properly with the + external HSQLDB server. By default the project wizard tries to use= the JBoss embedded + HSQLDB, but the tutorial uses an external database to replicate a = more real world + development scenario. Click on Edit to modify the Connection + Profile. + +
+ DataBase Setting + + + + + +
+ + Select JDBC Connection Properties<= /property>. Make sure the URL is set to + jdbc:hsqldb:hsql://localhost:1701 + + +
+ JDBC Connection Properties + + + + + +
+ + Try click on Test Connection button. It probably won=E2=80=99t work. This + happens if the hsql jdbc driver is not exactly the same. This can = be worked around by + modifying the HSQLDB database driver settings. To modify the setti= ngs, click the + =E2=80=9C...=E2=80=9D nex= t to the drop-down box. + + The proper Driver JAR File should be listed under Driver File(s). + Select the hsqldb.jar file found in the database/lib directory and= click on + Ok. + +
+ Driver Details + + + + + +
+ + Select Hypersonic DB an= d click on Ok. Again, + this only happens if the selected hsqldb.jar is different from the= running database. + +
+ Hypersonic DB Selecting + + + + + +
+ + Now, the Test Connection should succeed. After testing the + connection, click on Ok. + +
+ Connection Testing + + + + + +
+ + You can leave the Code Generation<= /property> section as is. It refers to Java + packages in which the generated code will be placed. + +
+ Code Generation Setting + + + + + +
+ + Click on Finish button.= Now, there should be a new Seam project + called =E2=80=9Cworkshop=E2=80=9D listed in Package Explorer view.= + +
+ "worskhop" Project in the Package Explorer + + + + + +
+
+ +
+ Start JBoss Application Server + + The complete information on how to manage JBoss AS from JBoss = Developer Studio you can + read in a corresponding chapter. + Now you just need to start the server by clicking on the Start= the server icon ( = + + + + + ) in the + JBoss Server View. + + Then run the project by selecting the project and use Run As... > + Run on Server. + + + Note: + If the project does not show up, then you can use a normal b= rowser and use + http://localhost:8080/workshop/hom= e.seam + as the url. + + + Your project looks like this: + +
+ "workshop" Project Started + + + + + +
+ +
+ +
+ Workshop Project Code Overview + + Now let's examine the project and its structure. Go back to th= e Package Explorer view in + JBoss Developer Studio. + + It seems like it's not much for project but this shell applica= tion contains a login + screen with default login logic, a menu template that can be furth= er modified, and other + layout templates. + + It's important to note that the business logic will reside in = the + src/hot + folder, by default. And, the package naming convention= s that were used in New Seam + project wizard could have been changed to something dif= ferent from + org.domain.workshop.session. + Also, notice that there is a default Authenticator. java + file. This is where custom security logic can be added. Seam has a= nice declarative security + model that we will explore in a bit more detail later on. The + src/main + folder is a model directory. It stores the project's J= PA entity beans. + = +
+ Project Structure + + + + + +
+ = + The view tier of the + application is also important. Seam uses facelets and there is a b= uilt-in facelets GUI + editor that has some nice WYSIWYG and component drag/drop function= ality. Try this out by + opening home.xhtml from WebContent folder. + +
+ Facelets GUI Editor + + + + + +
+ + Notice that the templates reside in the + WebContent/layout + folder. There is a stylesheet in the + WebContent/stylesheet + folder. There is also a login and default error page. = The Facelet editor will be + explored in more detail later in the lab. + + The project already has a datasource that was created per the = Seam project wizard + database settings. And, obviously all of the Seam specific configu= ration files and JAR + dependencies are included and placed in the proper locations. On l= ast noteworthy line item + is related to the build script. There isn=E2=80=99t a build script= because the Eclipse WTP(Web Tools + Project) plugin is used to publish web application changes. As you= can see, JBoss Developer + Studio is removing a great deal of complexity from the enterprise = Java project + setup/deployment process. The end result is a developer that is wr= iting code, not spending + days/weeks trying to figure out how to get a decent development en= vironment and project + build process. + +
+ +
+ + +
+ Seam Action Development + + Now, it=E2=80=99s time to write some code. The good news is that= JBoss Developer Studio can also + help out in this respect. In this section, we will create a new Seam= Action POJO and facelet + with some custom business logic and some GUI changes. + +
+ Create a New Seam Action + + Go to main menu bar and click on + File > New > New Seam Action + to start the New Seam Action wizard. + + Specify a Seam component name (e.g., "myAction"). + The other properties will be auto-completed for you so there is no= need to change them. + Click on Finish. + +
+ New Seam Action Wizard + + + + + +
+ + Now, open the MyAction.java file and replace the + "myAction" method with this logic: + + + + You also need to import the java.u= til.Calendar class by clicking + CTRL + Shift + O. + +
+ +
+ Test Seam Action + + The new action can be tested by browsing the workshop-test pro= ject. JBoss Developer + Studio has already created a TestNG test case for you. + +
+ "workshop-test" Project + + + + + +
+ + The test case simulates a Seam component/method execution for = the + MyAction.myAction() logic= . + To run the test case, right click on MyActionTest.xml and click + Run As > TestNG Suite + or use the Run As... toolbar shortcut as shown + below. + +
+ TestNG Running + + + + + +
+ + With any luck, the test case will pass. Look at the TestNG vie= w. + +
+ TestNG Results + + + + + +
+ + Now, it=E2=80=99s safe to test the new Seam Action in a web br= owser. The fastest way to do that + is to right click on myAction.xhtml and use + Run As... > Run On Server + which will show the appropriate url in the browser. Al= ternatively you can + manually enter + http://localhost:8080/workshop/myAct= ion.seam + into a browser. + +
+ Seam Action in a Web Browser + + + + + +
+ +
+ +
+ Modify Seam Action User Interface + + Browse to + http://localhost:8080/workshop/myAct= ion.seam + and click on myAction. This executes the =E2=80=9CmyAction=E2=80=9D method. + This looks pretty good, but we could make this page look a little = better. + + Open + WebContent/myAction.xhtml + in JBoss Developer Studio to use the nice facelets edi= tor. + +
+ Open Seam Action with Editor + + + + + +
+ + Right click on the "myAction!" button in the visual part of ed= itor and + select <h:commandButton> Attribu= tes. + +
+ Seam Action Editing + + + + + +
+ + Change the value of the= button to something different. If desired, + you can change any other text on the page. Then, type + CTRL + S + to save the facelet. + +
+ Attributes Dialog + + + + + +
+ + Refresh + http://localhost:8080/workshop/myAct= ion.seam + and now you should see your changes. + + Notice that you did not have to publish the application. JBoss= Developer Studio + auto-published it for you. + +
+ Seam Action Is Modified + + + + + +
+ +
+ + +
+ +
+ Declarative Security + + In this section you will see how it=E2=80=99s easy to secure the= facelets and facelet components + in Seam. Let=E2=80=99s go ahead and secure the action button, then w= e will secure the entire + page. + +
+ Edit Login Authentication Logic + + There is a class called Authentica= tor.java. The login page will + execute the Authenticator.authenticate= () method by default, so we=E2=80=99ll + start by adding some custom login logic. + Open Authenticator.java= in JBoss Developer Studio and replace the + authenticate() method wit= h this code: + + + +
+
+ Secure Seam Page Component + + Open myAction.xhtml and= add a new secured command button: + ]]> + + Refresh + http://localhost:8080/workshop/myAct= ion.seam + If you are not logged in you will only see one button.= If you are logged in, + there will be two buttons. + + +
+ One Button on a Page + + + + + +
+ + The secured button is not visible because the user isn=E2=80= =99t logged in as + "admin". + +
+ Secured Button is Visible + + + + + +
+ + The user is logged in as "admin". Securing + components is easy but securing pages is pretty simple as well. + Open + WebContent/WEB-INF/pages.xml + . Then add this markup directly underneath the <page= s> + element: + + ]]> + + Refresh + http://localhost:8080/workshop/myAct= ion.seam + If you are not logged in you will get bounced back to = the login page. + +
+ Login Page + + + + + +
+ + Thus, if you enter login credentials for the + "admin" user, you will be= re-directed to the + secured page and secured component. If you enter different login c= redentials, page access + will be granted, but the secured component will not be displayed.<= /para> + + Congratulations! You have secured your new action both at the = facelet component and page + level. You also added custom authentication logic to the login act= ion. + +
+ +
+ +
+ Browsing Workshop Database + + In this section you get to know how to use the workshop database= that was started at the + beginning of the lab. + +
+ Database Connectivity Setup + + The workshop data can be browsed inside of JBoss Developer Stu= dio. + + To open the Data Source Explorer, click on Window > Open Perspective + > Other > Database Development. + In the Data Source Explorer, expand a Databases node and select a + Default database. Right c= lick on it, select + Connect from the context = menu. + +
+ Data Source Explorer + + + + + +
+ +
+ +
+ Browse Workshop Database + + Then in the current view, drill down to the CUSTOMERS table. + +
+ "CUSTOMERS" Table + + + + + +
+ + Right click on CUSTOMERS, select + Data > Sample Contents + to view the data in the table. + + There should be a SQL Results view on the workbench, but it co= uld be hidden. Click on + the "Result1" tab in the ri= ght side and you should + see the data in the CUSTOMERS table. + + +
+ SQL Results View + + + + + +
+ + + Note: + If you can=E2=80=99t find the SQL Results view tab, click on= Window > Show + View > Other > SQL Development > SQL Results. + + + Congratulations! You just connected to the workshop database a= nd queried the content + using Database Explorer tools. + +
+ +
+ +
+ Database Programming + + Now, it=E2=80=99s time to reverse engineer the workshop database= into a fully functioning Seam + CRUD(Create Read Update Delete) application. + +
+ Reverse Engineer CRUD from a Running Database + + In JBoss Developer Studio, switch to Seam + perspective, and then right-click the project and sel= ect + New > Seam Generate E= ntities. + + "workshop" project in the Seam Gen= erate Entities + wizard will be selected automatically. There is no ne= ed to change something + more, click + Next + to proceed further. + +
+ Generate Seam Entities + + + + + +
+ + On the next page use the + Include + button to include all the tables from the database and= click + Finish. + +
+ Selecting Tables + + + + + +
+ + After running the Generate Entities action, you will see new <= emphasis> + org.domain.workshop.entity + classes. These classes represent insert/update/delete/= query logic. + +
+ org.domain.workshop.entity Classes + + + + + +
+ + There are also + org.domain.workshop.entity + package that contains the JPA classes. These are the e= ntity beans that are + mapped to database tables.Note,that you can use Seam refactoring t= ools with Seam components. + Read more about it in Seam r= efactoring tools chapter of Seam Dev Tools Reference Guide. + + Last, but not least, there are facelets for all of the CRUD sc= reens. The best way to get + a feel for the generated code is to open a browser and play around= with the application. Go + to + http://localhost:8080/workshop + and insert/update/delete/query a few records. There is= quite a bit of AJAX in + this application, but which we will explore further later on in th= e lab. For now, take note + of the page tabs, required field logic and data table sorting in t= he list pages. + +
+ CustomersList.xhtml in the Editor + + + + + +
+ + Congratulations! You now have a fully functioning CRUD applica= tion that is already AJAX + enabled. + +
+ +
+ Use Hibernate Tools to Query Data via JPA + + Now, it's time to write some JPA queries using the Hibernate p= erspective in + JBoss Developer Studio. + In the upper right corner of the workbench there is a small ic= on (see the figure below), + click on it and choose Hibernate. + +
+ Hibernate Perspective + + + + + +
+ + Look at the Hibernate Configurations view. In the "workshop" p= roject, + drill down on the Session Factory and notice that the JPA + entities/attributes are listed in a nice tree view. + +
+ Hibernate Configurations View + + + + + +
+ + Right click on the Session Factory= and select HQL + Editor. This will open a JPA query scratch pad window= . + + Write your query and click on the "Hibernate Dynamic SQL Previ= ew" tab. + You should see the SQL that will be executed if this JPA query is = run. + +
+ JPA Query Editor + + + + + +
+ + Run the query by clicking on the green run icon. + + The results are listed in the "Hibernate Query Result" tab. Th= ere is a + "Properties" tab in the workbench that can be used to see a specif= ic JPA + result. These results represent the JPA objects because our query = did not specify column + names. + +
+ Hibernate Query Result View + + + + + +
+ + The query can be refined, and take note that there is nice cod= e completion in the JPA + query editor. + +
+ Code Completion + + + + + +
+ + A refined query will return results that are more ResultSet or= iented. Notice the join + logic that JPA supports. + +
+ The Hibernate Query Result + + + + + +
+ + + There was no need to specify an Em= ployees table in the + from part of the JPA quer= y because JPA supports reference traversal + via Java class attribute references. Not only are JPA and HQL quer= ies fully supported, but + Criteria based queries can also be written in the Criteria Editor.= You should spend some + time tinkering with different queries and possibly Criteria based = queries, even though the + instructions are not provided in this lab. + +
+ Criteria Editor + + + + + +
+ +
+ +
+ Use Hibernate Tools to visualize the Data Model + + Now, it=E2=80=99s time to view the data model for the workshop= database. + + In the Hibernate Configurations view, select "workshop" projec= t and + expand the Configuration no= de. Select the + Customers entity, right c= lick on it, choose Open Mapping + Diagram. + +
+ Mapping Diagram Opening + + + + + +
+ + + You see a Diagram tab for the CUSTOMERS table and any tables t= hat have FK references. + This is a handy way to view the data model and JPA mappings. Now, = you=E2=80=99ve got access to + something that the Erwin Data Modeler can=E2=80=99t do. + + +
+ Diagram Tab + + + + + +
+ +
+
+ + +
+ Rich Components + + This lab will conclude with one last AJAX twist. In this section= we add a RichFaces + inputNumberSlider to the Or= der Details edit screen. + +
+ Add a Richfaces component to the CRUD Application + + Switch to Seam perspective, open + WebContent/OrderdetailsEdit.xhtml + in JBoss Developer Studio. + Change the form field values using the visual editor. Seam has= generated the form field + names that match the database column names. This is not ideal for = business users. + +
+ Form Fields Editing + + + + + +
+ + Also, replace the QTY Ordered input field with a inputNumberSlider. + You can use the JBoss Developer Studio palette or right click on t= he form and insert the + RichFaces component. + +
+ Insert RichFaces Component from Context Menu + + + + + +
+ + One the last option is to use the source view and manually cop= y the inputNumberSlider + markup listed below: + + ]]> + +
+ Manually coping Source Code + + + + + +
+ + The end result is an edit page that has better form labels and= a new RichFaces + control. + +
+ The Result Page + + + + + +
+ + Congratulations! You have completed the JBoss Developer Studio= lab. + +
+ +
+
+ = + = + + + + + JBoss Developer Studio + JSP + JBoss + + + Developing a simple JSP web application + = + + Note: + We highly recommend developing in Seam= . This chapter is for users + who for some reason cannot use Seam. + + = + In this chapter you'll find out how to create a simple JSP application using the + JBoss Developer Studio. The appli= cation will show a classic + "Hello World!" on the page. + We'll assume that you have already launched JBoss Developer + Studio and also that the Web Deve= lopment perspective is the + current perspective. If not, make it active by selecting + Window > Open Perspective > Web Devel= opment + from the menu bar or by selecting + Window > Open Perspective > Other...<= /property> + from the menu bar and then selecting Web Development from th= e Select Perspective + dialog box. + = +
+ + Setting Up the Project + We are going to start with the creating a Dynamic Web Project with= a minimal + structure, i.e. with just required facets. Thus this section will perfo= rm you all + necessary steps on how to do this. + + + Go to the menu bar and select + File > New > Other... + + + + Select + Web > Dynamic Web Project + in the New Project dialog box + + + Click + Next + + + + + Enter "jspHello" as a project name + + + Then select + Minimal Configuration + from the list of possible configurations and click + Finish + + + +
+ Create New Web Project + + + <= /imagedata> + + +
+ = + The + jspHello + node should appear in the upper-left Package Explorer + view. +
+ New Web Project + + + <= /imagedata> + + +
+
+ = +
+ + Creating JSP Page + This section covers all the points how to create, edit and then pr= eview JSP page. + In our simple application we need to create only one JSP page whic= h displays a + "Hello World!" message. + + + Right click WebContent >= ; New > + JSP. + + + Type "hello.jsp" for a file name and click the + Next + button. + + + In the next window you can choose a template for your jsp page and= see its preview. + + + Select + New JSP File (xhtml) + template and click + Finish + button. + + +
+ Create JSP Page + + + <= /imagedata> + + +
+ Our hello.jsp page will now appear in = + Project Explorer. + +
+ + Editing a JSP Page + Let's now make a little change so that a jsp page displays + "Hello World!" message. + + + + + = + Insert this line inside the = + <body> </body> + + tag: + + + + ]]> + + = + Notice that content assist functionality is always available when= you are typing: +
+ Content Assist in JSP Page + + + = + + +
+ After changes made your + hello.jsp + page should look like this: +
+ Hello.jsp Page Source + + + = + + +
+ = + This line will actually output "Hello + World!" message in the Console<= /property>. To make the + message displayed in the Browser, just replace this line with the simp= le + Hello World!. +
+ = +
+ + web.xml file + When you are creating web project the wizard creates the + web.xml + for you automatically. The web.= xml file editor + provided by JBoss Developer Studio is available in two modes: + Tree and Source. +
+ Web.xml in Design and Source Mode + + + + + +
+ Both modes are fully synchronized. Let's add mapping to our + hello.jsp + page in + web.xml + file. + + + Switch to Source tab. + + + Add the next code into = + <welcome-file-list> + : + + + hello.jsp +]]> + If you come back to Tree m= ode you will see that the changes + made are automatically reflected in that mode. + Actually you don't really need to do any configurations right now= . +
+ = +
+ + Deploying the project + While creating any web project you could experience a pain writin= g ant scripts and + managing the packaging even when writing the most trivial web applicat= ions. With + JBoss Developer Studio you are = saved from such a pain. All + you need is to start JBoss Server and launch your application + in your favorite browser. + You can also create a war archive with JBDS's Archive Tools + and export it to any web server. +
+ + WAR Config + Project archives managing is available through Project Archives view. + + + Select + Window > Show view > Other > J= Boss + Tools > Project archives + from menu bar + + + Select a project in Package Explorer you want to be archived + + + In Project Archives you w= ill see available archive types + for the project: +
+ Project Archives + + + + + +
+ + + Click, for example, + WAR + option to create war archive + + + In the New WAR dialog you= can see automatically selected + default values. +
+ New WAR Archive + + + + + +
+ + + Click + Next + to see a stub archive configuration for your project: + Stub Archive Configuration + + + + + + + + + + Click + Finish. The + .war file will appear in Package + Explorer and also in Projec= t Archives + view as structure tree:
+ Archive is Created + + + + + +
+
+ Archive in Project Archives View + + + + + +
+
+
+
+ Via Project Archives view= you could now edit your + archive, add new folders, publish to server, and so on: +
+ Configure Archive + + + + + +
+
+ = +
+ + Auto redeploy + When you are creating a web application and register it on JBoss + Server it is automatically deployed into + /deploy directory of the server. JBDS comes with= the + feature of auto-redeploy. It means that you don't need to restart + JBoss Server. Any changes made= in the application in + exploded format will trigger a redeployment on the server. + = + You can also use the "Finger touch" button for a quick restart o= f the project without restarting the server: +
+ Finger Touch button + + + + + +
= + The "Finger" touches descriptors dependent on project (i.e. web.= xml for WAR, application.xml for EAR, jboss-esb.xml in ESB projects). + = +
+ = +
+ = +
+ + JSP Page Preview + JBDS comes with JSP design= -time preview features. When + designing JSP pages you can easily preview how they will look during r= untime. You + can even a= ttach your stylesheet to the + Preview. + + + Make a little change to + hello.jsp + page, e.g. put this code snippet: + + + +]]> + + + Click + Save + button. + + + Switch to Preview page by clicking = Preview tab at the + bottom of the page. You will see how the page will look at runtime.<= /para> + + + +
+
+ + Launch JSP Project + Let's now launch our project on server. We'll use + JBoss Server that is shipped wi= th JBoss Developer + Studio. You can do it by performing one of the following a= ctions: + + + Start JBoss Server from JBoss + Server view by clicking the Start the server icon ( + + + + + ) . + + + = + + + Click the Run icon or right click your project folder and selec= t + Run As > Run on Server. If you + haven't made any changes in + web.xml + file or cleared it out you can launch the application by= right + clicking the + hello.jsp + page and selecting + Run on the Server ( = + + + + + ). + + + = + You should see the next page in a Browser : +
+ Running Project + + + + + +
+ Thus with the help of this chapter you've learnt how to organize = a Dynamic + Web Project with a minimal configuration, add any staff to it (in our = case it's + just one jsp page) and deploy and run it on the JBoss Server + shipped with JBDS. + +
+ = +
+
+ + = + + + + + JBoss Developer Studio + JSF + JBoss + RAD + + + RAD development of a simple JSF application + + + Note: + We highly recommend developing in Seam. This chapter is for users + who for some reason cannot use Sea= m. + + + In this chapter you will see how to create a simple JSF applicat= ion being based on + "RAD" philosophy. We wi= ll create the familiar + Guess Number application. The scenario is the following. You are a= sked to guess a number + between 0 and 100. If the guess is correct, a success page is disp= layed with a link to play + again. If the guess is incorrect, a message is printed notifying t= hat a smaller or a larger + number should be entered and the game continues. + We'll show you how to create such an application from scratch, a= long the way + demonstrating powerful features of JBoss Developer Studio such as = project templating, Visual + Page Editor, code completion and others. You will design the JSF a= pplication and then run + the application from inside JBoss Developer Studio using the bundl= ed JBoss server. + +
+ + Setting up the project + First, you should create a JSF 1.2 project using an integrat= ed JBDS's new + project wizard and predefined templates. Follow the next steps= : + + + In Web Projects View (if it is not open select + Window > Show View = > Others > JBoss Tools Web + > Web Projects View) = click + Create New JSF Project= + button.
+ Create New JSF Project + + + + + +
+
+ + + Put GuessNumber as a project name, in JSF Environment + drop down list choose JSF = 1.2 + + + Leave everything else as it is and click + Finish + + +
+ Our project will appear in Project Explorer and Web Projects= Views. As you can see + JBoss Developer Studio has created for us the whole skeleton f= or the project with all + needed libraries, faces-config.xml and web.xml files. +
+ New JSF Project + + + + + +
+ + As the project has been set up, new JSP pages should be crea= ted now. +
+
+ + Creating JSP Pages + + Here, we are going to add two pages to our application. The = first page is + inputnumber.jsp. It prompts you to enter a number. If the gues= s is incorrect, the same + page will be redisplayed with a message indicating whether a s= maller or a larger number + should be tried. The second page is success.jsp. This page wil= l be shown after you guess + the number correctly. From this page you also have the option = to play the game again. + + Now, we will guide you through the steps on how to do this.<= /para> + + + Open + faces-config.xml + file + + + Right click anywhere on the diagram mode + + + From the context menu select + New View + + + +
+ Create New View + + + + + +
+ + + + Type + pages/inputnumber + as the value for + From-view-id + + + + Leave everything else as is and click + Finish + + + + In the same way create another jsf view. Type + pages/success + as the value for + From-view-id + + + + Select + File > Save + + + + On the diagram you will see two created views. +
+ New Views + + + + + +
+
+ +
+ + Creating Transition between two views + Then, we should create connection between jsp pages. + + + In the diagram, select the + Create New Connection<= /property> + icon third from the top along the upper le= ft side of the diagram to + get an arrow cursor with a two-pronged plug at the arr= ow's bottom
+ Create Connection + + + + + +
+
+
+ + Click on the + pages/inputnumber + page icon and then click on the + pages/success + page icon + +
+ A transition should appear between the two icons of views. +
+ Created Connection + + + + + +
+ + + Select + File > Save + from the menu bar + + +
+ +
+ + Creating Resource File + A resource file is just a file with a .properties<= /emphasis> extension for + collecting text messages in one central place. JBoss Developer= Studio allows you to + create quickly a resource file. The messages stored in resourc= e file can be displayed to + you on a Web page during application execution. + With resource file first, you don't hard code anything into = the JSP pages. + And second, it makes it easier to translate your application t= o other languages. All you + have to do is to translate all your messages to the other lang= uage and save them in a + new properties file with a name that ends with the appropriate= ISO-639 language code. + It is a good idea to keep your resources inside the + JavaSource + folder, where you keep your .java files. Every tim= e you build the project, + all .properties files will then be copied= to the + classes folder by default. + + + Right click + JavaSource + folder and select + New > Folder + + + + Type + game + for Folder name and click + Finish + + + + Your resource file and java bean will be stored in this fold= er. + + + Right click on + game folder + and select + New > Properties Fi= le + + + + Type + messages + as the value for "name" attribute and clic= k + Finish + + + + JBoss Developer Studio will automatically open + messages.properties fil= e for editing. +
+ Messages.properties File + + + + + +
+ + + Click + Add + button for adding new attribute to your re= source file + + + Type + how_to_play + for "name" and + Please pick a number b= etween 0 and 100. + for value + + + Click + Finish + + + + In such a way add the next properties: + + + + + + Click + File > Save + from the menu bar + + + Your .properties file should now look like follows: +
+ Properties are Added + + + + + +
+ + Up + and + Down + buttons allow you to move you attribute on the lis= t. For delete the attribute, choose it and press + Delete b= utton. + If you want to change a value or a name of your attribute, c= lick on it and than on + Edit button.= + = + If the .properties file is rather big and there are a lot of= entries in it, you can use filtering and regular expressions to find the n= ecessary ones. The Filter and Regular Expressions Search is implemented by = an expandable panel, closed by default: + When "Expression" is not selected (as by default), filter is= case insensitive. When "Expression" is selected, filter uses regular expre= ssions which are case sensitive +
+ Filter and Regular Expressions Search Panel + + + + + +
+ Enter the characters that should be searched for in the ent= ries to the 'name' or 'value' input fields accordingly. The filtered resul= ts will be displayed in the table below: + = +
+ Filter results + + + + + +
+ = + When using regular expressions please note, that regular exp= ression syntax does not use "*" for any characters and "?" for any one char= acter. It's necessary to use "." for any one character and ".*" for any cha= racters. Symbols "*" and "?" are used to show that the preceding token is n= ot required, for example, "a.a" matches "aba" but not "aa", while "a.?a" or= a.*a" matches both; besides "a.*a" matches "abcda". + To find the exact match, use sequences \A and \z in expressi= on. For example, expression "\Adate\z" matches only string "date"; expressi= on "\Adate" matches "date" and "dateline", expression "date\z" matches "dat= e" and "Begin date", and expression "date" matches all of them. + = +
+ +
+ + Creating Java Bean + In this section you'll see how to create a Java bean that wi= ll hold business + logic of our application. + + + Right click + game folder + + + + Select + New > Class + + + + Type + NumberBean + for bean name + + + A java bean is created. + + + Declare the variable of your entered number: + + + + JBDS allows to quickly generate getters and setters for java= bean. + + + Right click + NumberBean.java + in Package Explorer + + + Select + Source > Generate G= etters and Setters... + + + + Check + userNumber + box and click + OK + +
+ Generate Getters and Setters + + + + + +
+
+
+ + Add the declaration of the second variable + +
+ + + + .. other bean methods: + + + randomNumber ) = + msg =3D bundle.getString("tryagain_smaller"); + else // if number smaller, get appropriate message + msg =3D bundle.getString("tryagain_bigger"); = + // add message to be displayed on the page via tag + context.addMessage (null, new FacesMessage(msg)); = + // return 'tryagain' for navigation + return "tryagain"; + } + } +]]> + + + And the import declarations: + + + + The whole java bean should look as follows: + randomNumber ) = + msg =3D bundle.getString("tryagain_smaller"); + else // if number smaller, get appropriate message + msg =3D bundle.getString("tryagain_bigger"); + = + // add message to be displayed on the page via tag + context.addMessage (null, new FacesMessage(msg)); = + // return 'tryagain' for navigation + return "tryagain"; + } + } +} +]]> +
+ +
+ + Editing faces-config.xml File + In this section you know about faces-config.xml file. + This file holds two navigation rules and defines the backing= bean used. + + + Open faces-config.xml file in a source mode + + + Add here one more navigation rule and a managed bean= declarations that the + content of the file looks like this: + + + + + = + + * + + playagain = + /pages/inputnumber.jsp + + + + + /pages/inputnumber.jsp + + success = + /pages/success.jsp + + + = + + NumberBean + game.NumberBean + session + + = + +]]> + The first navigation rule states that from any page (* stands for + any page) an outcome of playagain will take you to + /pages/inputnumber.jsp + . Outcome values are returned from backing bean met= hods in this example. The + second navigation rule states that if you are at the page + /pages/inputnumber.jsp + , and the outcome is success, then navigate to the = + /pages/success.jsp + page. +
+
+ + Editing the JSP View Files + Now, we will continue editing the JSP files for our two "vie= ws" using + Visual Page Editor. +
+ + Editing inputnumber.jsp page + First, let's dwell on how to edit inputnumber.jsp. + On this page we will have an output text component displ= aying a message, a text + field for user's number entering and a button for input su= bmission. + + + Open inputnumber.jsp by double-clicking on the <= emphasis> + /pages/inputnumber= . jsp + icon + + + The Visual Page Editor will open in a screen split betwe= en source code along the + top and a WYSIWIG view along the bottom. You can see that = some JSF code will be + already generated as we choose a template when creating th= e page. + At the beginning it's necessary to create a = + <h:form> + component where all others components are put. + + + Place the mouse cursor inside = + <f:view> + </f:view> + + + + Go to JBoss Tools Palette and expand JSF HTML fo= lder by selecting + it + + + Click on = + <h:form> + tag
+ Insert h:form + + + + + +
+
+
+ + In the dialog Insert Tag select + id + and click on this line below the value= header. A blinking cursor + will appear in a input text field inviting to ente= r a value of id
+ Define Id of Form + + + + + +
+
+
+ + Type + inputNumbers + and click + Finish + + +
+ In source view you can see the declaration of a form. +
+ Created Form + + + + + +
+ First let's declare the properties file in inputnumber.j= sp page using the + loadBundle JSF tag. + + + Put this declaration on the top of a page, right= after the first two + lines: + + + +]]> + As always JBDS provides code assist: +
+ Code Assist + + + + + +
+ + + Switch to Visual tab, so it could be possible to= work with the editor + completely in its WYSIWYG mode + + + Click on + outputText, drag the cursor over to the + editor, and drop it inside the blue box in the edi= tor + + + + Select + value + and click on this line below "value" + header + + + Click ...= button next to the value field + + + JBDS will nicely propose you to choose within available = values: +
+ Choose Value + + + + + +
+ + + Expand + Resource Bundles &= gt; msg + + + + Select + how_to_play + value and click + Ok. Then click + Finish + +
+ Selecting Value + + + + + +
+
+
+
+ The text will appear on the page: +
+ Created OutputText Component + + + + + +
+ + + Switch to Source mode and insert = + <br/> + tag after = + <h:outputText> + component to make a new line. + + + Click + Save + button. + + + On the Palette click on + inputText, drag the cursor over to the + editor, and drop it inside the editor after the te= xt. + + + Switch to a Source mode and insert + <br/> + tag after = + <h:outputText> + component to make a new line + + + Click + Save + button + + + On the Palette click on + inputText, drag the cursor over to the + editor, and drop it inside the editor after the te= xt + + + Select + value + and click on this line below "value" + header + + + Click ...= button next to the value field + + + Expand + Managed Beans >= NumberBean + + + + Select + userNumber + value and click + Ok + + + + Switch + Advanced + tab + + + Select + id + and click on this line below "value" + header + + + Type + userNumber + in text field + + + Select + required + and click on this line below "value" + header + + + Click ...= button next to the value field + + + Expand + Enumeration + and select + true + as a value + + +
+ Add "required" Attribute + + + + + +
+ + + Click + Ok, then click + Finish + + + + Go to Source mode + + + Add the validation attribute to = + <f:validateLongRange> + for user input validation + + + + + +]]> + + + Click + Save + button + + + Again select + Visual + mode + + + On the Palette, click on + commandButton, drag the cursor over to + the editor, and drop it inside the editor after th= e inputText + component. + + + In the editing dialog select + value + and click on this line below "value" + header + + + Click ...= button next to the value field + + + Expand + Resource Bundles &= gt; msg + and select + makeguess_button + as a value + + + Click + Ok + + + + Select + action + and click on this line below "value" + header + + + Type + NumberBean.checkGu= ess + in text field + + + Click + Finish + + + + In Source mode add = + <br/> + tags between = + <outputText> + , <inputText> + and <commandButton> + components to place them on different lines + + + inputnumber.jsp page should look like this: + +<%@ taglib uri=3D"http://java.sun.com/jsf/core" prefix=3D"f" %> + + + + + + + + + +
+ +
+ + + +
+
+ +
+
+ + +]]>
+
+
+ + Editing success.jsp page + In the same way like inputnumber.jsp, edit success.jsp p= age. Its whole source + should be the next: + +<%@ taglib uri=3D"http://java.sun.com/jsf/core" prefix=3D"f" %> + + + + + + + + + + + + +
+
+ +
+
+ + + +]]>
+ Again you can use code assist provided by JBDS when edit= ing jsp page: +
+ Code Assist for <f:param> + + + + + +
+ This page, success.jsp, is shown if you correctly guesse= d the number. The + <h:outputFormat> + tag will get the value of success_text from the properties= file. The {0} + in success_text will be substituted for by the value of th= e value attribute within + the <f:param> + tag during runtime. + At the end, you have a button which allows you to replay= the game. The action + value references a backing bean method. In this case, the = method only terminates the + current session so that when you are shown the first page,= the input text box is + clear and a new random number is generated. + + + Switch to Preview mode to see how this page will= look in a browser: + + +
+ Success.jsp in Preview Mode + + + + + +
+
+
+
+ + Creating index.jsp page + Now you know how to create index.jsp page. + The index.jsp page is the entry point of our application. It= 's just + forwarding to inputnumber.jsp page. + + + Right click + WebContent > New &g= t; JSP File + + + + Type + index + for name field and choose + JSPRedirect + as a template + + + Click + Finish + + + + The source for this page should be like the followin= g: + + + + + + + + + +]]> + Note the .jsf extension of a page. It m= eans that we trigger the + JSF controller servlet to handle the page according the servle= t mapping in the + faces-config.xml file. +
+
+ + Running the Application + Finally, we have all the pieces needed to run the applicatio= n. + + + Start up JBoss server by clicking on the + Start + icon in JBoss Server view. (If JBoss is al= ready running, stop it by + clicking on the red icon and then start it again. Afte= r the messages in the + Console tabbed view stop scrolling, JBoss is available= ) + + + Right-click on project + Run AS > Run on Ser= ver + + + + Play with the application by entering correct as wel= l as incorrect + values + + +
+ You are Asked to Enter a Number Between 0 and 100</titl= e> + <mediaobject> + <imageobject> + <imagedata fileref=3D"images/rad_jsf_application/rad_j= sf_application_20.png"></imagedata> + </imageobject> + </mediaobject> + </figure> + <figure float=3D"0"> + <title>Your Input is Validated and an Error Message is Display= ed if Invalid Input was + Entered + + + + + +
+ +
+ After You Enter a Guess, the Application Tells You Whet= her a Smaller or a Larger + Number Should be Tried + + + + + +
+ +
+ Your Guess is Correct + + + + + +
+
+
+ = + = + + + + + + JBoss Developer Studio + Eclipse + Java + JBoss + + + Project Examples + = + JBoss Developer Studio provides an option to download and import a ready-made = + project that you can explore and derive some useful technology impleme= ntation lessons from. + = + + To adjust the settings of the Project Examples feature you need to= navigate to Windows> Preferences > JBoss= Tools > Project Examples = + . + = +
+ Project Examples Preferences + + + + + +
+ = + The Show experimental sites checkbox serves to enable/disable representing the user sites in the Project Example dialog ( Help > Project Examples). + + = +
+ User Sites + + As you can see from the Project Examp= les Preferences image you can add a custom project example that = can be provided by anyone. = + This feature can, for example, facilitate project testing. + = + + + In oder to add a new project example you need to select the User sites + option and press the Add button to the right. + + When the Add button i= s pressed the + Add Project Example Site dialog is displayed. The dialog contains 2 = + input fields: Name wher= e you need to specify the name of the new entry and URL = + that has to point to the xml file that contains example project= (s) properties. = + In more detail the structure of the xml file is discussed furth= er in the chapter of the guide. + Alternatively, if the xml is stored on your local machine, you = can hit the Browse button to select = the file in the file system. + Here is an example of the xml file that holds project examp= le settings: + = + + + User Examples + User Project Example + + Short project description. + + + Full project description. + + 10900 + + http://projectexample.org/projectexample.zip + + + +]]> = + = + Once you define the location of the xml file with projects s= ettings you will see a new user site entry added. = + Please note now if you select the entry you can edit and remo= ve it with the corresponding buttons to the right. = + You can not do such operations with the Plugin provides sites. + = + When the user sites location is set up you can download and = install the project(s). = + Please see the next chapter of the guide. +
+ = + = + = +
+ Downloading a Project Example + = + To download a project example and start working with it you= need to take a few steps: + + + Go to the menu bar and select File > New > Other... + + = + Select J= boss Tools > Project Examples (You can also call t= he Project Examples from menu bar: Help > Project Examples.= .. or directly from File &= gt; New > Example... menu ) + = + = + + = +
+ Project Examples + + + + + +
+ = + + Alternatively, you should navigate to New > Other.., scroll down to find the JBoss Tools option (or just type in the first letters = of the word "JBoss" for quick search), expand the option and select Project Examples, click Next. + + + Now in the New Pro= ject Example dialog you can select a project you would like to e= xplore and a site to download it from + Project Examples Wizard provides a filter field to = more easily locate the project examples you want, so you can type in the pr= oject you would like to explore in the field. + = + + = + = +
+ Selecting a Project Example + + + + + +
+ = + If you have previously specified user sites (see the User Sites chapter) they also will be displaye= d in the list of project examples in the category that was defined in the = xml file with user sites settings. +
+ User Site + + + + + +
+ = + + Pleas note that to view the user sites you need to have Show experimental sites checked. + + = + + Note: + + The Show the Quick F= ix Dialog option is described in the Quick Fixes section. + + + = + + Press Fi= nish to start downloading the project from the reposi= tory + + = + + = + When downloading is finished the project will be imported au= tomatically and you will be able to see it in the Package Explorer. + = + Now you can run the application on the server. + = + + = + = +
+ Seam Demo Application run on the Server + + + + + +
+ +
+ = +
+ Quick Fixes + + Project Examples Wizard has an option for making quick fixes = + for the imported project to easily fix possible issues like m= issing servers, Seam runtimes etc. + + To enable quick fixing option you need to check the + Show the Quick Fix dialo= g while choosing the Project Example. + = + When the project you selected is downloaded it will be check= ed for missing dependences and if there are some you will see a dialog list= ing the problems. +
+ Quick Fix Dialog box + + + + + +
+ To fix the problem you need to: + = + + Select the problem from the list + Click Qu= ick Fix button + + = + You will be offered a solution or a number of solutions to t= he problem. + = +
+ Quick Fix Dialog box: Selecting a Fix + + + + + +
+ In this case(see the image above), when the Finish button is pressed, Seam = Settings dialog box will be displayed where you need to provide a path to t= he Seam environment to fix the issue. + = + When the problem is fixed you will be returned to the Quick = Fix dialog box with the remaining problems to be fixed. + = +
+ = + = +
+ + = + + + + + + JBoss Developer Studio + Eclipse + Java + JBoss + + + FAQ + + For more information on JBoss Develo= per Studio features, refer to the + following FAQ to get the answers on the most "popular" questions.<= /para> + +
+ What should I do if Visual Page Editor does not start under= Linux + + Linux users may need to do the following to get the Visual Page + Editor to work correctly on their machines. + + + + On Red Hat based Linux distributions install the xpL= ib.i386 package + + + Type + + + + and/or use + + + + Open the JBDS perspective. If you see the Help view = open, close it and restart + JBDS + + If it doesn't help and you use Fedora Core Li= nux and Eclipse Version: 3.4.1,the issue can be produced because libswt-xul= runner-gtk-3449.so file doesn't present + in eclipse-swt-3.4.1-5.fc10.x86_64.rpm/eclipse/plugins/org= .eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar.To add this file to eclipse = you should: = + + + + Decompress eclipse/plugins/org.eclipse.swt.gtk.l= inux.x86_3.4.1.v3449c.jar form eclipse-SDK-3.4.1-linux-gtk-x86_64.tar.gz + = + + Copy libswt-xulrunne= r-gtk-3449.so file to your Fedora Eclipse location. + = + = + + Open the file eclipse.ini,which can be found in = your Fedora Eclipse location and add the following line: + = ,where /usr/lib/eclipse is the path= to your eclipse folder. + = + + + + If none of these work, do the following: + + + Clear the Eclipse log file, + <workspace>\.metadata\.log= + + + Start Eclipse with the -debug option: + + + + Post the Eclipse log file + (<workspace>\.metadata\.lo= g) on + the forums. + + + + +
+ +
+ Do I need to have JBoss Server installed to run JBoss Devel= oper Studio? + + No. JBoss Developer Studio already comes bundled with JBoss + Server. We bundle it together so that you don't need to downlo= ad any additional + software and can test your application in a Web browser right = away. + If you want to use a different JBoss server installation, af= ter JBoss + Developer Studio is installed open Servers View= (select + Window > Show= View > Others > Server + > Servers), then right click = on this + view > New > Server + and follow the wizards steps to point to another J= boss Server + installation. + JBoss Developer Studio works with any servlet container, not just + JBoss. For more information on deployment, please see the Depl= oying Your Application + section. +
+ +
+ I have an existing Seam 1.2.1 project. Can I migrate/import= the project to a JBDS + Seam project? + + We highly recommend you to create Seam 1.2.1 project using t= he + JBDS. In other case= try to do manually: + + + + Create a Seam Web project to get the JBoss tools str= ucture + + + Then from your Seam 1.2.1 seam-gen project start doing the f= ollowing: + + + Copy src to <= property moreinfo=3D"none">src + + + Copy view to = Web content + + + Copy resources individual files to where they are in= the seam web project + etc. + + + +
+
+ I have an existing Struts or JSF project. Can I open the pr= oject in JBDS? + + Yes. From main menu select + File > Import > Other &g= t; JSF Project (or Struts + Project) + and follow wizards steps. + +
+ +
+ Can I import a .war file? + + Yes. Select File > = Import > Web > WAR + file, then follow importing ste= ps. +
+ +
+ Is it possible to increase the performance of Eclipse after= installing your + product? + + JBoss 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 e= xample: + + +
+ +
+ How can I add my own tag library to the JBoss Tools Palette= ? + + See Adding Tag + Libraries in Visual Web Tools Guide. +
+ +
+ How to get Code Assist for Seam specific resources in an ex= ternally generated + project? + + To get Code Assist for Seam specific resources in an externa= lly generated project, you + should enable Seam features in Project Preferences. Right clic= k an imported project and + navigate + Properties > Seam Settings<= /property>. Check + Seam support + box to enable all available Seam + Settings. +
+ +
+ How to import an example Seam project from jboss-eap direct= ory? + + To import an example Seam project from + jboss-eap + into your working directory, you should perform th= e following steps: + + + + Go to + New > Other > Ja= va Project from Existing Buildfile + + + + + Point to the + build.xml + of any chosen project by pressing + Browse + button + + + + Hit + Finish + to open the project + + + + As these seam examples are non WTP projects, next you should= enable Seam support for + them. To do that, right click the project and go to + Properties > Seam Settings<= /property>. +
+ +
+ Is a cross-platform project import possible for JBDS?</titl= e> + + <para>Yes. You can easily import created in Linux JSF, Struts or S= eam project to Windows and + vice versa.</para> + + <para>To do the transferring JSF, Struts or Seam project, go to <e= mphasis> + <property moreinfo=3D"none">Menu > Import > General = > Existing Projects into Workspace</property>,</emphasis> + select the folder where your project stored and press <emphasi= s> + <property moreinfo=3D"none">Finish</property>.</emphasis><= /para> + </section> +</chapter> + + = +<chapter id=3D"further_reading" xml:base=3D"file:///home/vchukhutsina/repo= s/ochik_jboss/documentation/guides/GettingStartedGuide/en/modules/further_r= eading.xml" xreflabel=3D"further_reading"> + <?dbhtml filename=3D"further_reading.html"?> + <chapterinfo> + <keywordset> + <keyword>JBoss Developer Studio</keyword> + <keyword>Eclipse</keyword> + <keyword>Deploy</keyword> + <keyword>Deployment</keyword> + <keyword>JBoss</keyword> + </keywordset> + </chapterinfo> + + <title>Further Reading + + = + + + Seam Dev Tools Reference Guide + (html) + + This guide helps you to understand what Seam is and how to inst= all Seam plug-in into + Eclipse. It tells you the necessary steps to start working with Seam= Framework and assists in a + simple Seam Project creation. Also you will learn how to create and = run the CRUD Database + Application with Seam as well as find out what Seam Editors Features= and Seam Components are. + + = + + + Visual Web Tools Reference Guide + (html) provi= des general orientation and an overview of JBDS visual web tools functional= ity. This guide discusses the following topics: editors, palette, web prope= rties view, openOn, content assist, RichFaces support. = + + + = + + + JBoss Server Manager Reference Guide + (html) + + This guide covers the basics of working with the JBoss server m= anager. You will read how to + install runtimes and servers and quickly learn how to configure, sta= rt, stop the server and know + how deployment and archiving process. You will find out how to manag= e installed JBoss Servers + via JBoss AS Perspective. You will also read how to deploy modules o= nto the server. + + = + + + jBPM Tools Reference Guide + (html) + + With jBPM Tools Reference Guide we'll help you to facilitate a c= ross-product + learning and know how you can speed your development using special e= ditors and visual designers. + We'll also guide you through the steps on how to create a simple pro= cess and test it + within jBPM jPDL perspective. + + = + + + Hibernate Tools Reference Guide + (html) + + Throughout this guide you will learn how to install and use Hibe= rnate Tools bath via Ant and + through Eclipse. We'll supply you with the information on how to cre= ate mapping files, + configuration file as well as a file for controlling reverse enginee= ring by using specific + wizards that Hibernate tooling provides. Also you will know about Co= de Generation and + peculiarities of work within Hibernate Console Perspective. + + = + + + ESB Editor Reference Guide + (html) + + This guide provides you with the information on ESB Editor and a= ll necessary wizards for ESB + files development. + + = + + + JBoss Portal Tools Reference Guide + (html) + + The guide gives a detail look at how you can easily build a Port= let Web Application with + JBoss Tools and deploy it onto JBoss Portal. + + = + + + JBoss WS User Guide + (html) + + This guide gives you practical help on JBossWS usage. You will l= earn how to create a web service using JBossWS runtime, find out how to cre= ate a web service client from a WSDL document using JBoss WS and also see h= ow to set your development environment. + + = + + + Smooks Tools Reference Guide + (html) + + This guide is packed with useful and easy-to-understand informat= ion about graphical, configuration and source editor pages. + + = + + + Drools Tools Reference Guide + (= html) + + The guide help you to discover how to create a new Drools projec= t, use debugging rules and work with different editors. + + = + + + JMX Tools Reference Guide + (html) + + With the help of this guide you'll explore the best practices to= follow when working with MBean Explorer, MBean Editor, Connections and etc= . + + = + + + Eclipse Guvnor Tools Reference Guide + (= html) + + The purpose of this guide is to describe briefly the functionali= ty present in the Eclipse Guvnor Tools (EGT) for Drools 5. + + = + = + = + + + JSF Tools Tutorial + (html)<= /ulink> + + This tutorial will describe how to deal with classic/old style of= JSF development and how + to create a simple JSF application using the JBoss Developer Studio. <= /para> + + = + + JSF Tools Reference Guide + (html)= + = + + From this guide you'll discover all peculiarities of work at a = JSF project. You'll + learn all shades that cover the process of project creation and take= a closer look at the JSF + configuration file. Also you'll get to know managed beans and how to= work with them and + find out, how to create and register a custom converter, custom vali= dator and referenced beans + in a JSF project. + + = + + Struts Tools Reference Guide + (ht= ml) + + In Struts Tools Reference Guide you will learn how to create and = work with a new struts + project. This guide also provides information about graphical editor f= or struts configuration + files, tiles files, and struts validation files. + + + + + Struts Tools Tutorial + (htm= l) + + This tutorial will describe the classical style of Struts develop= ment, and will + step-by-step show you how to create a simple Struts application in JBoss= Developer Studio. + + + + = + + Exadel Studio Migration Guide + (html) + + This document is intended to help you to migrate an existing Exade= l JSF or Struts projects + from Exadel Studio into JBoss Developer Studio. + + = + If there's anything we didn't cover in this guide, = + please feel free to visit our + + JBoss Developer Studio Users Forum or + + JBoss Tools Users Forum to ask questions. There we are a= lso looking for + your suggestions and comments. + + + + = + + Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuid= e/en/modules/getting_started.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/m= odules/getting_started.xml 2010-03-04 12:57:57 UTC (rev 20652) +++ branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/en/m= odules/getting_started.xml 2010-03-04 13:08:09 UTC (rev 20653) @@ -578,8 +578,15 @@ = Some of our newer plugins, like TPTP and BIRT, need additional dr= ivers. On the left side of the download page you can find all of the required drivers for chosen = build and their versions. - Instead of downloading the nightly build version manually, it&apo= s;s also possible to - get the latest release of JBoss Tools from one of= our update sites: + If you need to install any standalone plug-in from JBoss Tools vi= sit a JBoss = Tools Wiki page to read + about dependencies between standalone plug-ins. = +
+ Installation From Update Site + = + = + Instead of downloading installation/updating manually, it's = also possible to + get the latest release of JBoss Tools from one of= our update sites: = + Stable Updates: http://download.jboss.org/jbosstools/updates/stable @@ -588,55 +595,148 @@ Development Updates: http://download.jboss.org/jbosstools/updates/development<= /para> + + Nightly Builds: http://download.jboss.org/jbosstools/updates/nightly/trunk/ + + + To install/update Jboss Tools from one of the update sites you shou= ld follow the steps: + First, download the correct version of Eclipse = + for your platform which is compatible with the version of JBoss + Tools you plan to install.For example if you want to install + 3.1.0.GA Eclipse 3.5 is required. + If you do not already have Java 5 or 6 installed and in y= our path, + download and install it. + When Eclipse is started, go to + Help->Software Updates... ->Available Software->Manage S= ites...->Add...(Eclipse 3.4) + Help->Install New Software->Add..(Eclipse 3.5)= + + + After clicking Add button = Add Site View should appear. + In the Location field you should paste one of the u= pdate sites described + above.In Name you ca= n write any name you like. + In the end press the Ok button. +
+ Add Update Site + + + + + +
+
+ In the Install Vie= w select features to install, then click Next. +
+ Jboss Tools installation + + + + + +
+
+ = + + If Jboss Tools are already installed on your Eclipse and you are d= oing updating but not = + installation the following messages will appear in your Detail= s section. + Ignore them and press Next. +
+ Possible messages + + + + + +
+
+ When you click Finish the prosses of Installation/Updatin= g starts up. + Install. Restart when prompted. +
+ Message dialog + + + + + +
= +
+ After fetching all the features and plugins for installat= ion, + you may be prompted that your selection contains unsigned jars. + This is normal,simply accept the warning and continue. +
+ Warning Message + + + + + +
= +
+
= - - - Finally, install the build - - - - Unzip the file(s) directly into your Eclipse - plugins/features - directory and it will be readily available. It might be ne= cessary to start Eclipse - with eclipse -clean to make sure it starts clean and rereads the new l= ist of plugins. - - If you need to install any standalone plug-in from JBoss Tools vi= sit a JBoss = Tools Wiki page to read - about dependencies between standalone plug-ins. - = - You can update Jboss Tools and install a new version with the hel= p of "Install" wizard (Help > Install New Software...) - = + + Note: + While installing JBoss Tools on GNU/Linux (64-bit) through the ec= lipse installation manager you may run into some problems which can interru= pt your installation process. + Please, read the = + Manual installation of JBoss Tool= s 3.1.x on Eclipse 3.5 on GNU/Linux (64-bit) = + wiki article which provides you with the necessary steps to do it corr= ect. + +
+
+ Installation From Zip file + You can download Jboss tools in a zip file from one of the pages = below: + + + Stable Releases: http://www.jboss.org/tools/download/stable.html + + + Development Updates: http://www.jboss.org/tools/download/dev.html + + + Nightly Builds: http://download.jboss.org/jbosstools/updates/nightly/ + + + When you downloaded Jboss Tools Zip please DO NOT UNZIP = IT and follow the steps described below: + + When Eclipse is started, go to Help -> Install= New Software... -> Add... -> Archive... + Browse for the update site zip.In the Name field you can write any name you like. + In the end press Ok button.
- Updating Jboss Tools + Installation from a zip file - + -
+ = +
+ All the other steps are the same as it was described in = the + Installation From Update Site section. + = +
= - In "Work with" field add the path to the source to update from (e= .g. http://download.jboss.org/jbosstools/updates/development), check the ne= cessary software to install, more information about chosen software can be = found in "Details" section. -Follow "Available Software Sites" link to find more site to update f= rom - = -
- Available Software Sites - - - - - -
- = - - Note: - While installing JBoss Tools on GNU/Linux (64-bit) through the ec= lipse installation manager you may run into some problems which can interru= pt your installation process. - Please, read the = - Manual installation of JBoss Tool= s 3.1.x on Eclipse 3.5 on GNU/Linux (64-bit) = - wiki article which provides you with the necessary steps to do it corr= ect. - +
+ =
-
=
@@ -732,6 +832,10 @@ Now it's possible to upgrade from JBDS 2.0 to 2.1 using the u= pdate site which is available at = h= ttp://devstudio.jboss.com/updates/2.1. = This is described more fully in the JBDS Update Guide. + + Note: + You CAN NOT upgrade fro= m 2.1 to 3.0 using update site because of some platform change.Full install= ation is required. +
=
Modified: branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuid= e/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/pom.= xml 2010-03-04 12:57:57 UTC (rev 20652) +++ branches/jbosstools-3.1.x/documentation/guides/GettingStartedGuide/pom.= xml 2010-03-04 13:08:09 UTC (rev 20653) @@ -23,7 +23,7 @@ releaseJBDS - master_output.xml + master.xml classpath:/xslt/com/jboss/tools/xhtml-single-rele= ase.xsl classpath:/xslt/com/jboss/tools/xhtml-release.xs= l classpath:/xslt/com/jboss/tools/pdf.xsl --===============7229674116670291215==--