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