J2EE Architecture
The J2EE Architecture allows the programmers to divide their work into two major categories:
-
Business Logic
-
Presentation Logic
Presentation Logic consists of all the program (JSP and Servlets), images and html files that are used to interact with the client. These files are archived into .war file. These files are installed on the web server and these interacts with the users.
Business Logic:
These are EJB applications which implements the business logic of the system and are archived into .jar file. Business logic runs on the application server.
These two types of archives are bundled into complete J2EE applications, and delivered as Enterprise Archive (EAR) file.
Let's took an example of form processing. In
this example J2EE application could have and HTML form, which prompts
the user to input the data, a servlet to receive the data from the
form and process it, and also an Enterprise Bean to store the data in
a database. In this example the HTML form and servlet are archived in
a WAR file, and the Enterprise Java Bean is archived into JAR file.
These two archive files (WAR and JAR) both are added to the EAR file,
which is finally deployed on the server.
Tutorials
- Java 26 (JDK 26) Features with examples
- Top 10 Reasons to Learn Java in 2026
- JDK 26 Tutorial
- Java Certification Roadmap 2026: Which Oracle Certs Matter
- Install JDK 26: A Complete Beginner's Guide (2026)
- What Is Java? A Complete, Up-to-Date Guide for 2026
- Java 26 HTTP3 tutorial - HTTP 3 support in JDK 26 - How to use HTTP/3 in Java 26 application?
- JDK 28 Preview: Value Objects, Shenandoah GC & JSON API
- Java Tutorials