zoukankan      html  css  js  c++  java
  • 团队冲刺4 5.5

    服务器接送数据,返回数据

    package servlet;
    
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    
    
    
    @WebServlet("/SignServlet")
    public class Ejdkm extends HttpServlet {
        private static final long serialVersionUID = 1L;
           
        public Ejdkm() {
            super();
        }
    
        protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            request.setCharacterEncoding("utf-8");
            String account = request.getParameter("account");
            String password = request.getParameter("password");
            //链接数据库验证数据等操作
            String respon="";
            //根据需求返回值
            response.getWriter().append(respon);//返回值 
                    
        }
    
        protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            doGet(request, response);
        }
    
    }
  • 相关阅读:
    PHP MySQL 插入多条数据
    PHP MySQL 插入数据
    PHP MySQL 创建数据表
    PHP MySQL 创建数据库
    PHP 连接 MySQL
    PHP MySQL 简介
    PHP JSON
    12_短信发送器_发送短信实现
    11_短信发送器_快速回复页面实现
    10_短信发送器_获取电话号码
  • 原文地址:https://www.cnblogs.com/da48/p/14909912.html
Copyright © 2011-2022 走看看