Spring logic process for a login page

Source: Internet
Author: User

1, first user access to login.jsp

2, the user enters the login page user name/password, submits the form to the server, spring calls the Logincontroller controller to respond to the login request according to the configuration (key)

3, Logincontroller call the business layer method, according to the user name and password query whether there are matching users. Perform specific database access operations within the business layer by invoking the Userdao of the persistence layer.

4. If there are no matching users, redirect to the login page, otherwise to the next step.

5, Logincontroller call the business Layer login success method, the successful login business processing.

6. Redirect to welcome page main.jsp

File description for Spring

1, Dao: Data Access object, used to handle data access.

2, Service: To achieve specific business methods, such as detection of user names and so on.

3, Domain: domain object, in fact is JavaBean. Set, Get method.

4, Controller:controller used to handle requests from the page, call the business layer method, and make the page jump.

Here is actually an MVC, need to mention is now in the background also appeared MVC. such as ExtJS

Spring logic process for a login page

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.