JBoss.orgCommunity Documentation

Beginners Guide

Sean Rogers

Version: 3.3.0.M5

1. Introduction
2. The interface
2.1. JBoss Developer Studio
2.2. JBoss Central
2.3. Setting up a JBoss server
2.3.1. Adding a new application server for use with the JBoss Developer Studio
2.3.2. Using the JBoss application server with the JBoss Developer Studio
3. Java Web (EE) and Standard Edition (SE) Plug-Ins
3.1. Visual Web Tools
3.2. Seam Development Tools
3.3. Hibernate Tools
3.4. Portal Tools
3.5. JMX Tools
3.6. JSF Tools
3.7. JBoss AS Tools
3.8. Archive Tools
4. Service-Oriented Architecture Development
4.1. jBPM Tools
4.2. ESB Editor
4.3. Web Services Tools
4.4. Drools Tools
4.5. Eclipse Guvnor Tools
5. Where to go from here
6. Workshops
6.1. RESTEasy
6.2. Seam
A. Revision History

The JBoss Developer Studio is an Integrated Development Environment (IDE) that includes JBoss Tools and assists with the development of applications and services on JBoss Middleware software. These tools have been developed and are used by developers for increased efficiency and productivity with JBoss software.

This guide covers the basics of the interface you will be working with and the tools within it, assuming as little knowledge on your side as possible. If you are not familiar with JBoss Developer Studio then this guide is the best place to begin.

This chapter discusses the interface to the JBoss Developer Studio IDE.

The JBoss Enterprise Application Server provides the full range of Java EE 5 features as well as extended enterprise services including clustering, caching, and persistence.

To add a new server runtime follow these steps:

Once the new sever has been added, you can select it for use by clicking on its name in the Server Runtime Environment list and then clicking the OK button, which will then take you back to the main interface.

To start your new server, select it from those available in the Servers view and click the button displaying a white arrow in a green circle.

The JBoss Application Server can be started by selecting it in the Servers view, which can be found in the lower part of the window, and then clicking the green arrow to the right.

After the server has been successfully started the status field next to the server name will change from Stopped to Started, Synchronized.

Once the server has started, double click on the server name to see an Overview screen.

The Overview section contains the subsections: General Information, Management Login Credentials, Server Behaviour, Publishing, Timeouts, Application Reload Behavior, Server State Detectors and Server Ports.

The General Information subsection allows you to change the value for the Server name and Host name. By clicking on the Runtime Environment label a dialog box will be shown with options to change the name of the server runtime, the home directory, the Java Runtime and the server configuration that will be used when running the application server. The Open launch configuration button displays a dialog box that allows you to configure the technical details of the application server instance.

Below the General Information subsection is the Management Login Credentials subsection. Here you can set the User Name and Password that will be used to provide secure access to your server.

The last subsection on the left is dedicated to Server Behaviour. This section allows you to specify how JBoss Developer Studio should interact with the server and whether it is local or remote.

The Publishing subsection at the top right of the Overview section allows you to specify when applications will be published to the location specified (whether the applications will be made available through the application server depends on the server running and if it is configured to recognize dynamic changes). You can select to either never have an application be published automatically or for a check of new applications yet to be published to occur at a certain timed interval.

The Timeouts subsection below the Publishing subsections allows you to set the start and stop times (in seconds) in which the server should complete all of its operations. This setting is made available in order to decrease the chance of the server freezing or hanging.

The Application Reload Behavior subsection allows you to specify how and when applications associated with the server, are reloaded.

Below the Application Reload Behavior subsection is the Server State Detectors subsection. A server poller gathers information about the server at certain points in time, capturing information about processes and applications. This section allows you to select the pollers to be used during server startup and shutdown.

The final subsection is called Server Ports, below the Server Polling subsection. This section allows you to alter the port numbers that the server pollers gather their information from. The two settings JNDI Port and Web Port are set to be automatically detected by default; normally there should be no reason to manually select the port numbers.


Changing the Server Ports subsection configuration will not alter which ports the server itself listens on.

The default address of the server is http://localhost:8080, which you can type into your Internet browsers address bar.

Refer to the JBoss Server Manager guide for further details.

This chapter provides details on the Java plug-ins that are included in JBoss Developer Studio.

Visual Web Tools aids in the development of web pages and web projects.

Visual Page Editor

The Visual Page Editor allows an application to be developed in conjunction with a real time visual preview. The application can be viewed either as the source code, as a preview of the application, or both simultaneously in a split-screen presentation. The Visual Page Editor can be used for developing an application using technologies such as JavaServer Faces (JSF), JavaServer Pages (JSP), Struts, and Hypertext Markup Language (HTML). The Visual Page Editor also features a graphical toolbar for in-line styling.

Refer to the Editors chapter of Visual Web Tools Reference Guide for more details.

JBoss Tools Palette

The JBoss Tools Palette provides access to a library of tags used when creating JSP and JSF pages. Tags can be quickly inserted into pages from a number of libraries including:

  • HTML

  • JBoss

  • JSF

  • JSTL (JSP Standard Tag Library)

  • MyFaces

  • Oracle ADF (Application Development Framework) Faces

  • Struts

  • XHTML (Extensible Hypertext Markup Language)

Custom-made tags and third-party tag libraries can also be included in the JBoss Tools Palette.

Refer to the JBoss Tools Palette chapter of the Visual Web Tools Reference Guide for more details.

Web Projects View

The Web Projects View is an additional view. It enhances project authoring with a number of features including:

  • Project artifacts for JSF and Struts projects are organized by function, allowing for better project visualization.

  • Selected items can be dragged and dropped into JSP and other JSF compatible pages including:

    • JSF managed bean attributes.

    • JSF navigation rule outcomes.

    • Property file values.

    • Tag library files.

    • Tags from tag libraries.

    • JSP page links.

  • JSF and Struts projects can be quickly created or imported from the shortcut buttons.

  • Tag library files can be expanded, inspected, and easily added to the JBoss Tools Palette.

Refer to the Web Projects View chapter of the Visual Web Tools Reference Guide for more details.


OpenOn provides an easy method for switching directly from one project resource to another without navigating through the Package Explorer view. Pressing F3 or Ctrl+click when a reference to another file is highlighted will open the file in the editor.

Refer to the Editors chapter of the Visual Web Tools Reference Guide for more details.

Content Assist

Content Assist displays context-specific code completion suggestions while typing, speeding up development and reducing typing errors. Content Assist is supported in the following contexts:

The suggestion list can be displayed by pressing Ctrl+Space, and the highlighted entry can be selected and inserted by pressing Enter.

Refer to the Editors chapter of Visual Web Tools Reference Guide for full details.


Properties, managed bean attributes, navigation rules, tag library file declarations, and JSP pages can all be dragged from the Web Projects view and dropped into the editor to add content.

Refer to the Web Projects View chapter of the Visual Web Tools Reference Guide for more details.

RichFaces Support

RichFaces and Ajax4jsf tag libraries can be used from the JBoss Tools Palette, and RichFaces components are rendered in the Visual Page Editor.

Refer to the Editors chapter of the Visual Web Tools Reference Guide for more details.

JBoss Seam combines several technologies to reduce the complexity of developing modern Web 2.0 applications including:

Seam provides an interface to these different technologies through simple Plain Old Java Objects (POJO), user interface components, and XML. Seam does not distinguish between presentation-tier components and business logic components in an effort to present a simple, unified component model for the Java Enterprise Edition platform. Seam also provides mechanisms to manage application states across multiple workspaces, methods to manage workflow and pageflow through jBPM, and comprehensive integrated testing features.

The Seam Development Tools in JBoss Developer Studio allow for easy Seam application development with a number of features including:

New Seam Project wizard

The New Seam Project wizard allows the details of the Seam project to be configured, including target runtimes, target servers, project facets, and web module settings. It then generates all the necessary files for a Seam project.

Other Seam wizards

Wizards are also included for creating new Seam Actions, Seam Forms, Seam Conversations, and Seam Entities.

Entity generation

Another wizard exists for generating Seam entities. The wizard produces a set of CRUD (create-read-update-delete) Seam components and web pages. These can be generated by reverse-engineering an existing database, or by using the existing entities in the application.

Editors and views

There are a number of editors available in JBoss Developer Studio for working with Seam in addition to the Visual Page Editor including:

The Seam Editors implement Content Assist and OpenOn; for more details on these technologies refer to Section 3.1, “Visual Web Tools”. Seam Editors also feature validation tools to highlight potential issues with the application.

CRUD database applications

CRUD refers to the four basic SQL commands: create, read, update, and delete. A CRUD database application uses forms to retrieve data from and submit data to a database.

CRUD database applications can be created through the New Seam Project wizard.


TestNG (Testing, the Next Generation) is a Java-based unit testing framework. TestNG suites can be added to a project through the New Seam Action wizard.

Refer to the Seam Development Tools Reference Guide for more details.

This chapter provides details on the Service-Oriented Architecture (SOA) plug-ins that are included in JBoss Developer Studio.

The Enterprise Service Bus (ESB is an abstraction layer that interacts with the messaging system in a Service-Oriented Architecture (SOA).

JBoss Developer Studio includes a tool called the ESB file Editor. Through the use of this tool you can develop an application that will that will take advantage of the features in ESB. Features of the ESB Editor include:

ESB syntax validation

Constant contextual error checking is provided, with error checking on incorrect or incomplete tags also included when using the Source viewer.

XML schema support

By checking the child elements of the providers, the ESB Editor relays incorrect usage combinations to you through error messages upon startup.

ESB XML content assistance

Content Assist enables you to write code fast and with a higher degree of accuracy when using the Source mode.

Synchronized source and visual editing

The ESB Editor gives you the choice of using a graphical view (Tree), a code view (Source), or both when developing your ESB applications. With both instances open at once, the changes made to one are instantly visible in the other, ensuring that you are always working with the most current version of your application.

Refer to the ESB Editor chapter of the ESB Tools Reference Guide for further information.

JBoss ESB integrates component messaging into the JBoss Service-Oriented Architecture, serving as an integral part of the JBoss middleware suite. For information on how to use and configure JBoss ESB with the JBoss Service-Oriented Architecture refer to the Using and Configuring SOA Platform chapter of the ESB Tools Reference Guide.

Eclipse Guvnor Tools work with Drools Guvnor through rich web based GUIs and editors to provide a centralized repository for a vast quantity of rules. You can store versions of rules, models, functions, processes and other Drools generated components that all relate to executable knowledge bases. Access to the Guvnor is controlled, allowing you to lock down access and restrict features so domain experts (non programmers) can view and edit rules without being exposed to all the features at once.

The tools included for Eclipse Guvnor include:

Guvnor Connection Wizard

The Guvnor Connection Wizard is used to create a connection to a Guvnor repository. This wizard can be started by selecting FileNewOtherGuvnorGuvnor repository location, through the Guvnor Repositories View and other locations throughout Eclipse Guvnor Tools. Refer to the Guvnor Connection Wizard section of the Functionality Overview chapter within the Eclipse Guvnor Tools Reference Guide for more details.

The Guvnor Repositories View

The Guvnor Repositories View tool displays the contents of a repository using a tree structure. From within this tool you can create a new Guvnor repository connection, remove a Guvnor repository connection, refresh the tree display and expand or condense the tree layout. Refer to the Guvnor Repositories View section of the Functionality Overview chapter within the Eclipse Guvnor Tools Reference Guide for more details.

Guvnor Resource History View

The Guvnor Resource History View displays the revision history details for files that are both locally stored and within Guvnor repositories. Refer to the Guvnor Resource History View section of the Functionality Overview chapter within the Eclipse Guvnor Tools Reference Guide for more details.

Guvnor Resource Importing Wizard

The Guvnor Resource Importing Wizard assists with copying one or more files from a Guvnor repository to the local workspace (while keeping file association with the Guvnor repository). This wizard can be started by selecting FileImportGuvnorResource from Guvnor.

Actions for Local Guvnor Resources

A variety of actions can be performed on a file through Eclipse Guvnor Tools. Those actions are:

For documentation on the plug-ins available as part of the JBoss Developer Studio visit http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/.

For documentation about the JBoss Enterprise Application Platform visit http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/.

For information pertaining to Eclipse visit http://www.eclipse.org/.

Follow the instructions in these workshops to broaden your knowledge and understanding of JBoss Developer Studio.

In this RESTEasy workshop we will provide an example of how to solve the problem of creating new customers for an online store. This will be achieved through the creation of a shopping application and adding customer records through a web browser.


The following technologies are necessary for this workshop:

Make sure JBoss Developer Studio is open with the application server running. For simplicity it will be assumed for the rest of the workshop that you are running the JBoss Enterprise Application Platform 5, however the steps will be the same if you are using the JBoss Service Orientated Architecture Platform 5.

In JBoss Developer Studio navigate to HelpProject Example.

In the Project Example menu dialog box, scroll to RESTEasyRESTEasy Simple Example and click the Finish button.

There may be two issues to fix before you can continue. The description for these issues are Target runtime JBoss 4.2.2 Runtime is not defined and Java compiler level does not match the version of the installed Java project facet. If they do not appear skip to Figure 6.7, “Completed fixing the issues”. If they do appear, the following steps will resolve these issues.

To fix the first issue with the description Target runtime JBoss 4.2.2 Runtime is not defined click on this description and then click the Quick Fix button.

The next dialog box will display two runtime issues to fix, however by fixing the second one, labeled as Configure Targeted Runtimes, both issues will be corrected.

Select the issue called Configure Targeted Runtimes and click the Finish button.

A large dialog box will open displaying a long list of property categories on the left hand side. Navigate down to and click on the Targeted Runtimes property title. To the right of the menu where the JBoss 4.2.2 Runtime box is selected, deselect it and then select the name of your JBoss Enterprise Application Platform 5 runtime.

Once the JBoss Enterprise Application Platform 5 is selected and the old runtime deselected, click the Apply button and then the OK button.


In Figure 6.6, “Selecting the correct runtime”, the runtime that will be used is the one called JBoss EAP 5.0 Runtime Server, though the name will depend on what you called it when you configured the server for use with JBoss Developer Studio.

To fix the second issue with the description Java compiler level does not match the version of the installed Java project facet, click on its description and then click the Quick Fix button.

After clicking the Quick Fix button the Java compiler issue should disappear because the JBoss Developer Studio has made the necessary changes in the background to fix it.

The Quick Fix dialog box should now be empty. Click the Finish button.

To add the project to the JBoss Enterprise Application Platform 5 server right click (or Control-click on Mac OS) on the server name in the Servers view in the bottom section of your workbench. Click on the Add and Remove... option.

From the Add and Remove dialog box ensure the box labeled If server is started, publish changes immediately is ticked. In the left-hand menu, highlight the project you just created called simple by clicking on it.

Click the Add > button to move it from the left-hand menu labeled Available to the right-hand menu labeled Configured. Once this is completed click the Finish button.

Your RESTEasy project has now been deployed onto your server. We will now test the application by using the REST Client plug-in within the Firefox web browser.

Open your Firefox web browser and navigate to ToolsREST Client.

In the REST Client click on the Add Request Header button and type content-type for the Name and application/xml for the Value. This will ensure that the content will be consumable by the Plain Old Java Object (POJO) service at the server.

Select POST from the Method drop-down menu, copy http://localhost:8080/simple/rest-services/customers into the drop-down menu beside the Method and paste the following into the Request Body:

<customer><first-name>Bill</first-name><last-name>Burke</last-name><street>256 Clarendon Street</street><city>Boston</city><state>MA</state><zip>02115</zip><country>USA</country></customer>

The XML for the Request Body must not contain any spaces between XML tags to avoid exceptions occurring at the server end.

Click the Send button to add the customer information.

To ensure the customer details were added, change the Method type to GET and the URL address to http://localhost:8080/simple/rest-services/customers/1. The /1 is added to the URL to select the customer with the customer id of 1, since that is the number that was given to the customer.

Click the Send button to retrieve the information. Select the Response Body tab beneath the Request Body section to view the returned information.

We have added a customer and retrieved their information; now we will update their information. To achieve this change the Method to PUT and copy the following into the Request Body (overwriting anything that may be in the Request Body already):

<customer><first-name>Gary</first-name><last-name>Lamperillo</last-name><street>256 Clarendon Street</street><city>Venice</city><state>CA</state><zip>90291</zip><country>USA</country></customer>

Remember to make sure there are no spaces between the XML tags when you copy the information into the Request Body.

Check to make sure the URL still reads http://localhost:8080/simple/rest-services/customers/1 from when you retrieved the customer information. By using the URL that references the ID of the customer you are updating that customer's record.

Click the Send button to update the information.

To verify that the record has been updated change the Method type to GET, ensure the URL still references customer ID 1 and click the Send button.

Select the Response Body tab beneath the Request Body section to view the returned information.

The RESTEasy workshop is now complete.

Revision History
Revision 6.0.1-1Mon Aug 05 2013Michelle Murray
TOOLSDOC-382: Rebuilt for Customre Portal, content unchanged
Revision 2-1Wed Jul 04 2012Isaac Rooskov
Major updates and restructuring
Revision 1-2Wed Jan 12 2011Matthew Casperson
Review and editing
Revision 1-1Mon Feb 22 2010Isaac Rooskov
Review and editing
Revision 1-0Thu Nov 26 2009Isaac Rooskov
Initial creation of book by publican