JQuery Ajax MD5 Implement user Registration instant authentication function _jquery

Source: Internet
Author: User
Tags md5

The actual project compares commonly used (JQUERY+AJAX+MD5), belongs to the instant verification, the bright spot is verifies the user to exist that item, the concrete content is as follows

Specific examples

registe.jsp

<span style= "Font-size:large;" ><%@ page pageencoding= "UTF-8"%> <%@ taglib uri= "Http://java.sun.com/jsp/jstl/core" prefix= "C"%> <% @ taglib uri= "http://java.sun.com/jsp/jstl/fmt" prefix= "FMT"%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  
 

Accountservlet.java

<span style= "Font-size:large;" >package com.validator.test; 
 
Import java.io.IOException; 
Import Java.io.PrintWriter; 
 
Import javax.servlet.ServletException; 
Import Javax.servlet.http.HttpServlet; 
Import Javax.servlet.http.HttpServletRequest; 
Import Javax.servlet.http.HttpServletResponse; 
 
public class Accountservlet extends HttpServlet {public 
 
 
 void doget (HttpServletRequest request, HttpServletResponse Response) 
 throws Servletexception, IOException { 
 this.dopost (request, response); 
 public void DoPost (HttpServletRequest request, httpservletresponse response) 
 throws Servletexception, IOException { 
 String loginname=request.getparameter ("LoginName"); 
 PrintWriter out = Response.getwriter (); 
 if (Loginname.equals ("abc123")) { 
 out.println ("1"); 
 } else{ 
 out.println ("0"); 
 } 
 Out.flush (); 
 
 } 
 

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Related Article

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.