Chapter 1. Get Started Developing Applications
1.1. About Jakarta EE Copy linkLink copied to clipboard!
1.1.1. Jakarta EE 8 Copy linkLink copied to clipboard!
Jakarta EE 8, maintained by the Eclipse Foundation, is based on Java Enterprise Edition 8.
The 7.3 release of JBoss EAP is a Jakarta EE 8 compatible implementation for both Web Profile and Full Platform specifications.
For information about Jakarta EE 8, see About Jakarta EE.
1.2. About Java EE Copy linkLink copied to clipboard!
1.2.1. Overview of Java EE Profiles Copy linkLink copied to clipboard!
Java Enterprise Edition (Java EE) 8, as defined in JSR 366, includes support for profiles, which are subsets of APIs that represent configurations that are suited to specific classes of applications.
Java EE 8 defines specifications for the Web and the Full Platform profiles. A product can choose to implement the Full Platform, the Web Profile, or one or more custom profiles, in any combination.
- The Web Profile includes a selected subset of APIs that are designed to be useful for web application development.
- The Full Platform profile includes the APIs defined by the Java EE 8 Web Profile, plus the complete set of Java EE 8 APIs that are useful for enterprise application development.
JBoss EAP 7.3 is a certified implementation of the Java EE 8 Full Platform and the Web Profile specifications.
See Java™ EE 8 Technologies for the complete list of Java ™ EE 8 APIs.
Java EE also 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.
1.2.2. Transition from Java EE to Jakarta EE Copy linkLink copied to clipboard!
After the Java Enterprise Edition 8 release, Oracle transferred Java EE to the Eclipse Foundation. The API code, implementation code, and Technology Compatibility Kit (TCK) code were transferred as part of a phased transfer process. A new certification process, the Jakarta EE Specification Process (JESP), was set up and a new specification license, the Eclipse Foundation Technology Compatibility Kit license, was created.
As part of this transfer process, new names were created for all Jakarta specifications corresponding to the existing Java EE specifications. All the new names start with Jakarta and are followed by a simple description of the specification. The Java EE specification names mentioned in the JBoss EAP documents and the names of the corresponding Jakarta EE specifications are listed in the Java EE Specifications Relevant for JBoss EAP and the Corresponding Jakarta EE Specifications section.
Additional Resources
*See Java EE Specifications Relevant for JBoss EAP and Corresponding Jakarta EE Specifications.
1.3. Setting Up the Development Environment Copy linkLink copied to clipboard!
Download and install Red Hat CodeReady Studio.
For instructions, see Installing CodeReady Studio stand-alone using the Installer in the Red Hat CodeReady Studio Installation Guide.
Set up the JBoss EAP server in Red Hat CodeReady Studio.
For instructions, see Downloading, Installing, and Setting Up JBoss EAP from within the IDE in the Getting Started with CodeReady Studio Tools guide.
1.4. Configure Annotation Processing in Red Hat CodeReady Studio Copy linkLink copied to clipboard!
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 Red Hat CodeReady 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>
<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 Red Hat CodeReady 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.5. Configure the Default Welcome Web Application Copy linkLink copied to clipboard!
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")
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=path,value="/path/to/content")Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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)
/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)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the server for the changes to take effect.
reload
reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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)
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-web-module,value=hello.war)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the server for the changes to take effect.
reload
reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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
/subsystem=undertow/server=default-server/host=default-host/location=\/:removeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the server for the changes to take effect.
reload
reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow