The JBoss Central editor includes several quickstarts that provide a quick run-through of Java EE 6 features.
The quickstarts are based on amazing Pete Muir's JBoss AS7 quickstarts - JBoss AS 7.0 - Getting Started Developing Applications Guide
and are adapted to work with Eclipse/JBoss Tools.
This blog guides you how to install JBoss Tools 3.3 and start work with Java EE 6 using these tutorials.
Installing JBoss Tools 3.3
In order to install JBoss Tools 3.3, you need to perform the following steps:
http://download.jboss.org/jbosstools/updates/development/indigo/
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17647/450-382/jeeblog1.png
- Wait for Eclipse to download and install the JBoss Tools 3.3.
- Restart Eclipse when required.
You have installed JBoss Tools 3.3.
JBoss Quickstarts (JBoss Central)
After Eclipse restarts, you will get the JBoss Central editor.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17598/450-297/jeeblog3.png
Expand the JBoss Quickstart widget in the Project Examples section
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17599/310-152/jeeblog4.png
The helloworld, numberguess, login and kitchensink quickstarts will guide you through creating a Java EE 6 application.
Here I will describe to you how to create the helloworld application. The rest of the applications are used in a similar way, but they introduce new concepts as shown in the following figures:
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17600/310-103/jeeblog5.png
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17601/310-116/jeeblog6.png
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17602/310-172/jeeblog7.png
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17603/310-145/jeeblog8.png
The HTML5 is a template project that doesn't include any cheat sheet.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17604/310-107/jeeblogX.png
Helloworld quickstart
In order to create the helloworld Java EE 6 application, you have to do the following:
- click the Helloworld project example in the JBoss Central editor
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17605/310-182/jeeblog9.png
- JBoss Tools will warn you that you have to install JBoss AS 7.0 or 7.1 in order to create, deploy and run this application.
If you have already installed and configured JBoss AS 7.x, you won't see any requirement and will be able to skip to the step 3. - When the JBoss AS is installed and configured, you will get the following dialog:
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17609/310-158/jeeblog13.png
Click the Start button.
The jboss-as-helloworld project will be imported and you will get the helloworld cheat sheet that will help you to review the application.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17610/252-192/jeeblog14.png
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17611/310-355/jeeblog15.png
Read the introduction to learn how the application works and click Click to Begin.
The following screen will appear:
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17612/310-423/jeeblog16.png
After reading a detailed description, click Click when complete.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17613/310-426/jeeblog17.png
The HelloWorldServlet.java section explains the HelloWorld servlet in detail. When clicking the action, the cheat sheet will open the appropriate section of the code.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17614/450-253/jeeblog18.png
Run or skip all the actions in the HelloWorldServlet.java section. You will get the HelloService.java section.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17615/310-407/jeeblog19.png
Click Click to perform. The following screen will show up:
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17616/450-217/jeeblog20.png
That's it. You are ready to deploy and run the application on the JBoss AS 7 server you previously installed and configured.
Click Click to perform
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17617/310-412/jeeblog21.png
Click Next
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17618/310-412/jeeblog22.png
Finally, click the Finish button.
The cheat sheet will start the server, deploy the application and open it in a browser.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17619/450-333/jeeblog23.png
In a similar way, you will be able to create and review the numberguess, login and kitchensink applications. Kitchensink is an especially interesting application. In addition to explaining many Java EE 6 features (CDI, JSF, EJB, JTA, Bean Validation, JAX-RS, Arquillian), it automatically runs an Arquillian test and enables you to create your starting project.
Some advanced Java EE developers might also be interested in reviewing this application.
https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4362-17821/310-592/jeeblog24.png