Java web can be divided into three layers: presentation layer, business layer, and persistence layer
Presentation Layer:
1. It is mainly implemented by jsp pages. jsp pages are mainly responsible for page rendering. It receives the actions sent from the client from the browser and transmits them to the servlet. servlet receives the data sent from the jsp, for data encapsulation, service calling, parameter passing, and page Jump, it is worth noting that the data transmitted between jsp and servlet is transmitted using context request, session, and application.
Business Layer:
2. The business layer is an intermediate transmitter. It can receive and transmit data from servlet to dao, and transmit data from dao to servlet for business processing.
Persistence Layer:
3. When the persistence layer receives data from the servlet, the data can be handed over to software such as a database for storage (such as adding a function ), you can also extract the data stored in the database to the servlet (such as the query function)
Util
4. util class, which is frequently used to connect to databases
The above is my basic understanding of Simple Layer 3. If you have any wrong or incomplete understanding, please add more...