Encodera

Thanks for reading!

Donate to the site — we work hard for you.

Contents

What is Jakarta EE

Jakarta EE is a set of standards for server-side Java applications: web pages, REST APIs, database access, transactions and security. It is not a single library but a platform: dozens of specifications designed to work together. You write code against the standard, and an application server runs it — a program that already contains implementations of all these standards.

A bit of history

YearNameWhat happened
1999J2EE 1.2Sun releases "enterprise" Java: servlets, JSP, EJB
2006Java EE 5Annotations replace bulky XML files
2017Java EE 8The last version run by Oracle
2019Jakarta EE 8The platform moves to the Eclipse Foundation and gets a new name
2020Jakarta EE 9The javax.* packages are renamed to jakarta.*
2025Jakarta EE 11Requires Java 17+, supports records and Java 21

This course targets Jakarta EE 11, the current major version. If an old article has import javax.servlet..., it is about Java EE 8 or earlier: in new code the package is jakarta.servlet.

Specifications and implementations

A specification is a document plus a set of interfaces: what a technology must be able to do. An implementation is a concrete library that does what the document says.

SpecificationPurposeExample implementation
ServletHandling HTTP requestsTomcat, the Open Liberty engine
Jakarta REST (JAX-RS)REST APIsRESTEasy, Jersey
CDIDependency injectionWeld
Jakarta Persistence (JPA)Working with a database through objectsEclipseLink, Hibernate
Jakarta DataRepositories: queries without hand-written codeOpen Liberty, Hibernate
Bean ValidationData validationHibernate Validator
Jakarta FacesServer-side HTML pagesMyFaces, Mojarra

Your application depends only on the API — interfaces and annotations. The server provides the implementations, which is why a finished WAR file weighs only tens of kilobytes.

Application servers

ServerDeveloped by
Open LibertyIBM
WildFlyRed Hat
PayaraPayara Services
GlassFishEclipse Foundation

This course uses Open Liberty 26.0.0.9: it starts from Maven with one command and downloads everything it needs. The application is compiled for Java 21 and was run on Java 25. The same code deploys to the other servers unchanged — that is the point of a standard.

Where Jakarta EE is used today

Banks, insurance companies and government systems use the platform — anywhere applications live for decades. Many modern frameworks are built on its specifications: Quarkus and Helidon use CDI and Jakarta REST, Spring Boot uses Servlet, JPA and Bean Validation. So knowing Jakarta EE pays off even if you never pick an application server.

What we will build

One example runs through the whole course — a blog: posts, comments, users. First we make pages with servlets, then a REST API, then we add CDI, a database, transactions, Jakarta Data repositories and security, and at the end we package the application for release.

Common mistake

Mixing old and new packages. A library written for Java EE 8 with javax.servlet or javax.persistence will not work on a Jakarta EE 11 server: the classes simply are not there, and the server reports something like java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet. Check that your dependencies support the jakarta.* namespace.

Thanks for reading!

Donate to the site — we work hard for you.