Chapter 1. Get Started Developing Applications
1.1. Become Familiar with Java Enterprise Edition 7
1.1.1. Overview of Java EE 7 Profiles
Java Enterprise Edition (Java EE) 7 includes support for profiles, which are subsets of APIs that represent configurations that are suited to specific classes of applications. The only profile that the Java EE 7 specification defines is the Web Profile. A product can choose to implement the full platform, the Web Profile, or one or more custom profiles, in any combination.
JBoss EAP 7.2 is a certified implementation of the Java Enterprise Edition 7 full platform and the Web Profile specifications.
Java EE now includes support for JSR 375, which defines portable, plug-in interfaces for authentication and identity stores, and a new injectable-type SecurityContext interface that provides an access point for programmatic security. You can use the built-in implementations of these APIs, or define custom implementations.
Java Enterprise Edition 7 Web Profile
The Web Profile is the first and only profile defined by the Java Enterprise Edition 7 specification. It includes a selected subset of APIs that are designed to be useful for web application development. The Web Profile supports the following APIs:
Java EE 7 Web Profile Requirements:
- Java Platform, Enterprise Edition 7
Java Web Technologies:
- Servlet 3.1 (JSR 340)
- JSP 2.3
- Expression Language (EL) 3.0
- JavaServer Faces (JSF) 2.2 (JSR 344)
Java Standard Tag Library (JSTL) for JSP 1.2
NoteA known security risk in JBoss EAP exists where the Java Standard Tag Library (JSTL) allows the processing of external entity references in untrusted XML documents which could access resources on the host system and, potentially, allow arbitrary code execution.
To avoid this, the JBoss EAP server has to be run with system property
org.apache.taglibs.standard.xml.accessExternalEntitycorrectly set, usually with an empty string as value. This can be done in two ways:Configuring the system properties and restarting the server.
org.apache.taglibs.standard.xml.accessExternalEntity
-
Passing
-Dorg.apache.taglibs.standard.xml.accessExternalEntity=""as an argument to thestandalone.shordomain.shscripts.
- Debugging Support for Other Languages 1.0 (JSR 45)
Enterprise Application Technologies:
- Contexts and Dependency Injection (CDI) 1.1 (JSR 346)
- Dependency Injection for Java 1.0 (JSR 330)
- Enterprise JavaBeans 3.2 Lite (JSR 345)
- Java Persistence API 2.1 (JSR 338)
- Common Annotations for the Java Platform 1.1 (JSR 250)
- Java Transaction API (JTA) 1.2 (JSR 907)
- Bean Validation 1.1 (JSR 349)
The full platform implementation defined by the Java EE 7 specification includes additional APIs.
Java Enterprise Edition 7 Full Platform
The Java EE 7 specification full platform includes all APIs and specifications included in the Java EE 7 specification. It supports the following APIs in addition to those supported in the Java Enterprise Edition 7 Web Profile:
Included in the Java EE 7 full platform:
- Batch 1.0
- JSON-P 1.0
- Concurrency 1.0
- WebSocket 1.1
- JMS 2.0
- JPA 2.1
- JCA 1.7
- JAX-RS 2.0
- JAX-WS 2.2
- Servlet 3.1
- JSF 2.2
- JSP 2.3
- EL 3.0
- CDI 1.1
- CDI Extensions
- JTA 1.2
- Interceptors 1.2
- Common Annotations 1.1
- Managed Beans 1.0
- EJB 3.2
- Bean Validation 1.1
1.2. Setting up the Development Environment
It is recommended to use JBoss Developer Studio 11.0 or later with JBoss EAP 7.2.
Download and install JBoss Developer Studio.
For instructions, see Installing JBoss Developer Studio Stand-alone Using the Installer in the JBoss Developer Studio Installation Guide.
Set up the JBoss EAP server in JBoss Developer Studio.
For instructions, see Using Runtime Detection to Set Up JBoss EAP from within the IDE in the Getting Started with JBoss Developer Studio Tools guide.
1.3. Configure Annotation Processing in JBoss Developer Studio
Annotation Processing (AP) is turned off by default in Eclipse. If your project generates implementation classes, this can result in java.lang.ExceptionInInitializerError exceptions, followed by CLASS_NAME (implementation not found) error messages when you deploy your project.
You can resolve these issues in one of the following ways. You can enable annotation processing for the individual project or you can enable annotation processing globally for all JBoss Developer Studio projects.
Enable Annotation Processing for an Individual Project
To enable annotation processing for a specific project, you must add the m2e.apt.activation property with a value of jdt_apt to the project’s pom.xml file.
<properties>
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
</properties>
You can find examples of this technique in the pom.xml files for the logging-tools and kitchensink-ml quickstarts that ship with JBoss EAP.
Enable Annotation Processing Globally in JBoss Developer Studio
- Select Window → Preferences.
- Expand Maven, and select Annotation Processing.
- Under Select Annotation Processing Mode, select Automatically configure JDT APT (builds faster , but outcome may differ from Maven builds), then click Apply and Close.
1.4. Configure the Default Welcome Web Application
JBoss EAP includes a default Welcome application, which displays at the root context on port 8080 by default.
This default Welcome application can be replaced with your own web application. This can be configured in one of two ways:
You can also disable the welcome content.
Change the welcome-content File Handler
Modify the existing
welcome-contentfile handler’s path to point to the new deployment./subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=path,value="/path/to/content")NoteAlternatively, you could create a different file handler to be used by the server’s root.
/subsystem=undertow/configuration=handler/file=NEW_FILE_HANDLER:add(path="/path/to/content") /subsystem=undertow/server=default-server/host=default-host/location=\/:write-attribute(name=handler,value=NEW_FILE_HANDLER)
Reload the server for the changes to take effect.
reload
Change the default-web-module
Map a deployed web application to the server’s root.
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-web-module,value=hello.war)
Reload the server for the changes to take effect.
reload
Disable the Default Welcome Web Application
Disable the welcome application by removing the
locationentry/for thedefault-host./subsystem=undertow/server=default-server/host=default-host/location=\/:remove
Reload the server for the changes to take effect.
reload

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.