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);
        }
    
    }
  • 相关阅读:
    Luogu 1514 引水入城
    HDU 2196 Computer
    CF460C Present
    初等数论整理
    2019UMS培训day6解题报告
    2019UMS培训day5解题报告
    2019UMS培训day3解题报告
    Luogu 1731 生日蛋糕
    JavaWeb之ServletContext域对象
    c3p0连接池
  • 原文地址:https://www.cnblogs.com/da48/p/14909912.html
Copyright © 2011-2022 走看看