MVC Pattern Programming Demo sample-login authentication (static)

Source: Internet
Author: User

Well, part of the blog share my summary of Jsp-servlet-javabean ideas and the basic flow of the three-tier programming model, ZH-CNMVC This example to implement the programming pattern of the demo-login authentication process, where I am still using static authentication username and password. Guest, here is just a realization process to tell everyone. Not much to say, see the code:

First, create a JSP login page

Second, we build a servlet class to get the information submitted by the client.

And then. We need to configure the servlet option on the Web. XML, as if Eclipse is now actively generating the servlet's configuration code on its own. Just take a look at it.

Well, finally, we'll build a javabean. Detailed implementation of user authentication

Now. A complete MVC programming pattern is over, of course I'm doing very easy here. We can make it up to you.

Summary: The first JSP user interface inputs username and password to the end of the server Login_servlet. The server ends Login_servlet to reach the client from the information data. The server then uses this information as a parameter JavaBean to perform the corresponding functions, examples username, and password authentication, and the resulting server side will be able to return to the corresponding result client.

MVC Pattern Programming Demo sample-login authentication (static)

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.