The Java 2 Enterprise Edition (J2EE) is a specification for a multi-tier platform.
The tiers include a client
tier, a middle tier, and a back end tier. The client tier consists of web
browsers and Java client applications. The middle tier has two sub-tiers, the
web tier, which contains web servers, and the EJB tier, which contains EJB servers
(EJB = Enterprise JavaBeans). The back
end consists of databases:
In addition, the web and EJB
tiers can interact with web services such as stock tickers and credit card
validators.
An overview of the specification can be found at:
http://java.sun.com/javaee/technologies/index.jsp
The browser, web, and EJB servers can be viewed as containers that provide the functionality needed by all applications. Application-specific functionality is provided through components that can be added to the container. In essence, the components extend the functionality of the container, while the container manages the components.
Examples of J2EE components include EJBs (App Server components), Servlets (Web server components), and Applets (browser components).
We can add servlets to the browser that allow it to execute commands that go beyond simple HTTP commands. Executing these commands may even involve accessing the database.
If the commands get too complicated, then the web server may want to enlist the help of an application server that contains EJBs that can handle heavy business logic.