This diagram is NOT a Java EE stack .
This may be useful (or not :):
Java EE is a runtime driven system. (LAMP does not have such problems.)
Java EE uses a common container component architecture (LAMP does not define an explicit component container API)
Application servers such as JBoss, Glassfish, etc., provide a Java EE container. (Tomcat does not support the full Java EE stack. Tomcat and Jetty provide only a web container (or a web profile for the latest specifications.))
Please note that Java EE web containers (servlets) are much simpler than the full Java EE stack, but are based on the same architectural approach.
Java EE web components are (mostly) servlets and filters. On top of this architecture, various higher-order structures (such as Faces) are built. The Java EE Web container is relatively simple and very efficient. It is the closest to LAMP.
Java EE enterprise components (supported by Java EE application servers such as GlassFish) are various component options without state, state, and persistent components (known as "Beans" in the Java environment).
Hibernate is an ORM and redundant in the context of full Java EE (e.g. EntityBeans). Typically, JPA is used with the Java EE Web-Container systems to connect to JDBC compatible RDMBS. Oracle, MySQL, whatever.
you (and / or some third-party library) provide components.
The managed execution environment is primarily concerned with the care of "orthogonal" "corporate" "problems", such as transaction integrity, and you, the component / application developer, should be focused on the "business logic",
Java EE manages the links, transaction boundaries, connectivity, and life cycle of your components.
Links: the use of semantic links viewed at runtime through a namespace mechanism, such as JNDI and RMI; and dependency injection through declarative deployment descriptors.
Life cycle: your components will have the necessary phases of start-up, operation, and shutdown. You can connect to these LC events and participate if necessary (usually not necessary). This formalized LC allows you to distribute and scale the architecture.
Connectivity: Widely addresses incoming (clients) and internal (EIS) integration points. For clients you have web / RMI / JMS etc. This gives you the ability to synchronize req / rep semantics and asynchronous fire and forget. For the backend (in general), the JCA indicates connectors to other systems. JPA is a JCA specialization (not theoretically practiced) that specifically considers EIS databases with the JDBC user API.
Transactions: declarative means to apply the semantics of a transaction to specific methods of a component. This can be done at design time (via annotations) or during deployment (via XML).
Deployment Packages
Java EE systems are typically packaged as WAR (Internet only) or EAR (full stack).
Deployment descriptors
Recent Java EE specifications use zero-configuration operations with reasonable defaults (or trivial mappings). But it’s important for you to wrap yourself around everything in this and at some point, any serious Java EE application will require dealing with these artifacts at some level. (This is much simpler for web.xml, so don't worry.) This is a key aspect of the architecture. Understand this, and everything else is very clear.
Java EE uses indirection to do its magic. This is the issue that is addressed here:
We have components written by some third party (some time ago), and we must use them in our application. Deployment descriptors allow you to map your semantics to your application, for example. the name of the component or its semantics of the transaction to the semantics of the components. For example, you can open Acme-Logger as My-Very-Own-Logger. You achieve this by matching the name of the required environment with the component class. (The source component may have an annotation declaring its common name simply as a “registrar”).
Spring, in fact, came about because of severe pain in creating and maintaining these matching descriptors. Again, Spring is an alternative approach to container-based systems.
Containers
Theoretically, you should be able to connect the entire container to a compatible server, but the general idea is that you write your components for a universal container, for example. Java EE container. In any case, as you can imagine, Java EE application server vendors were not too keen on having a stack container plug-in API, as that would make their product a complete product.
Spring
Spring is actually the Java EE counter-inspector. This (or was) a lightweight container system for eliminating J2EE pain points (which was completely unreasonable without effective tools, given the complex architecture and deployment ceremony). In fact, the front of the servlet and the Spring container are an alternative to the full-blown Java EE glass. However, they can coexist.
Maven
Maven is a building tool. There is also ant. Or you can go to Gradle. There are Maven archetypes that allow you to get started with your Java EE core project effortlessly.
Sentence:
Start with (and stick to) a subset of Web containers. Jetty or Tomcat is the perfect container / server choice.
Check out WEB-INF / and web.xml. Write a simple HTTPServlet extension and play around with the web.xml features. Try to configure the filter or bind some parameters in the context of the web application. Learn these basics. Everything else is built on top of them. All.
In the servlet, examine the provided API. Find out the difference between applications, sessions, and context queries. The main thing in the web level. Learn how to redirect requests. Get HTTP headers, etc. Everything is built on them. Learn these basics.
Let's say you have a HelloWorld web application. Next step, try JPA and add perseverance to your project. Here you can try the Spring / Hibernate / Tomcat sample tutorial. Spring will configure a non-Java EE container for your business components (classes). Hibernate will take care of saving your data. A couple of new artifacts are introduced when you do this. Spring related xml files and JPA / Hibernate mappings. Get to know them and what it's all about.
You are almost ready. Finally, let's move on to the consideration of problems or perceptions. Here Java (imo) sucks, because it is too verbose, and this level is all about senseless repetition of the widget, the widget is placed here, etc.
In your simplest (and out of the box) you have a basic HTTPServlet and the ability to send back whatever you like. You can write your html in your code (a very bad idea) or use the template approach (Velocity, FreeMarker) or approach specialized components for presentation: JSP, Faces, etc. There will be literally dozens of frameworks (and approaches) for the presentation layer.
Hope this helps.