Java web simple three-tier structure

Source: Internet
Author: User

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...


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.