-
Language:
English
-
Language:
English
Chapter 5. Try It Out
5.1. Run the Quickstarts
5.1.1. Run the Quickstarts in JBoss Developer Studio
Procedure 5.1. Import the quickstarts into JBoss Developer Studio
Each quickstart ships with a POM (Project Object Model) file that contains project and configuration information for the quickstart. Using this POM file, you can easily import the quickstart into JBoss Developer Studio.
- If you have not yet done so, Section 4.2.4.2, “Configure the Maven Settings for Use with Command Line”.
- Start JBoss Developer Studio.
- From the menu, select File → Import.
- In the selection list, choose Maven → Existing Maven Projects, then click Next.
Figure 5.1. Import Existing Maven Projects
- Browse to the directory of the quickstart you plan to test, for example the
helloworld
quickstart, and click OK. The Projects list box is populated with thepom.xml
file of the selected quickstart project.Figure 5.2. Select Maven Projects
- Click Finish.
Procedure 5.2. Build and Deploy the helloworld
quickstart
The
helloworld
quickstart is one of the simplest quickstarts and is a good way to verify that the JBoss server is configured and running correctly.
- If you do not see a Servers tab, add it the panel as follows:
- Click Window → Show View → Other....
- Select Servers from the Server folder and click OK.
- Right-click on the
jboss-helloworld
project in the Project Explorer tab and select Run As. You are provided with a list of choices. Select Run on Server.Figure 5.3. Run As - Run on Server
- Select jboss-eap-6.2 from the server list and click Next.
Figure 5.4. Run on Server
- The next screen displays the resources that are configured on the server. The
jboss-helloworld
quickstart is configured for you. Click Finish to deploy the quickstart.Figure 5.5. Modify Resources Configured on the Server
- Review the results.
- In the
Server
tab, the JBoss EAP 6.2 Runtime Server status changes to[Started, Republish]
. - The server Console tab shows messages detailing the JBoss EAP 6.2 server start and the helloworld quickstart deployment.
- A helloworld tab appears displaying the URL http://localhost:8080/jboss-helloworld/HelloWorld and the text "Hello World!".
- The following messages in the Console confirm deployment of the
jboss-helloworld.war
file:JBAS018210: Register web context: /jboss-helloworld JBAS018559: Deployed "jboss-helloworld.war" (runtime-name : "jboss-helloworld.war")
The registered web context is appended tohttp://localhost:8080
to provide the URL used to access the deployed application.
- To verify the
helloworld
quickstart deployed successfully to the JBoss server, open a web browser and access the application at this URL: http://localhost:8080/jboss-helloworld
5.1.2. Run the Quickstarts Using a Command Line
Procedure 5.3. Build and Deploy the Quickstarts Using a Command Line
You can easily build and deploy the quickstarts using a command line. Be aware that, when using a command line, you are responsible for starting the JBoss server if it is required.
- If you have not yet done so, Section 4.2.4.2, “Configure the Maven Settings for Use with Command Line”.
Review the
README
file in the root directory of the quickstarts.This file contains general information about system requirements, how to configure Maven, how to add users, and how to run the Quickstarts. Be sure to read through it before you get started.It also contains a table listing the available quickstarts. The table lists each quickstart name and the technologies it demonstrates. It gives a brief description of each quickstart and the level of experience required to set it up. For more detailed information about a quickstart, click on the quickstart name.Some quickstarts are designed to enhance or extend other quickstarts. These are noted in thePrerequisites
column. If a quickstart lists prerequisites, you must install them first before working with the quickstart.Some quickstarts require the installation and configuration of optional components. Do not install these components unless the quickstart requires them.Run the
helloworld
quickstart.Thehelloworld
quickstart is one of the simplest quickstarts and is a good way to verify that the JBoss server is configured and running correctly. Open theREADME
file in the root of thehelloworld
quickstart. It contains detailed instructions on how to build and deploy the quickstart and access the running applicationRun the other quickstarts.
Follow the instructions in theREADME
file located in the root folder of each quickstart to run the example.