Book Image

Advanced Java EE Development with WildFly

By : Deepak Vohra
Book Image

Advanced Java EE Development with WildFly

By: Deepak Vohra

Overview of this book

<p>This book starts with an introduction to EJB 3 and how to set up the environment, including the configuration of a MySQL database for use with WildFly. We will then develop object-relational mapping with Hibernate 4, build and package the application with Maven, and then deploy it in&nbsp;WildFly 8.1, followed by a demonstration of the use of Facelets in a web application.</p> <p>Moving on from that, we will create an Ajax application in the Eclipse IDE, compile and package it using Maven, and run the web application on WildFly 8.1 with a MySQL database. In the final leg of this book, we will discuss support for generating and parsing JSON with WildFly 8.1.</p>
Table of Contents (18 chapters)
Advanced Java EE Development with WildFly
Credits
About the Author
About the Reviewers
www.PacktPub.com
Disclaimer
Preface
Index

Creating a Java EE web project


First, we need to create a Java EE web project for which you need to select File | New | Other. In New, select Web | Java EE Web Project, as shown in the following screenshot:

In the Java EE Web Project wizard, select Create a blank project and select WildFly 8.x Runtime as Target Runtime, which is shown as follows. A test gets run to find whether the required plugins are installed. Then, click on Next.

Specify Project name (jboss-resteasy) and Package (org.jboss.resteasy), and click on Next as follows:

Specify Group Id (org.jboss.resteasy), Artifact Id (jboss-resteasy), Version (1.0.0), and Package (org.jboss.resteasy), and click on Next, as shown here:

The jboss-resteasy Maven project gets created and gets added to Project Explorer, as shown here:

Next, add a JAX-RS resource class (HelloWorldResource), which is just a Java class. Select File | New | Other, and in New, select Java | Class and click on Next. Select Source folder (jboss-resteasy/src/main/java) and...