• 第七周作业


    public class person {
        private int uid;
        public int getUid() {
            return uid;
        }
        public void setUid(int uid) {
            this.uid = uid;
        }
        public String getUname() {
            return uname;
        }
        public void setUname(String uname) {
            this.uname = uname;
        }
        public String getPassword() {
            return password;
        }
        public void setPassword(String password) {
            this.password = password;
        }
        private String uname;
        private String password;
    }
    
     
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <form action="login1.jsp" method="post">
        输入用户名:<input type="text"  id="registername" name="registername"><br>
        输入密码:<input type="password" id="registerpassword" name="registerpassword"><br>
        <input type="submit" value="注册">
        
    </form>
    </body>
    </html>
    

         

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>注册收集</title>
    </head>
    <body>
         <% 
        person p = new person();
        String registername = request.getParameter("registername");
        p.setUname(registername);
        String registerpassword = request.getParameter("registerpassword");
        p.setPassword(registerpassword);
        
        RegisterDao rd=new RegisterDao();
        if(rd.add(p)>0){
            out.print("成功注册!"); 
        }else{
            out.print("注册失败,重试!"); 
        }
        
        %>
    </body>
    </html>
    

      

  • 相关阅读:
    HTTP处理程序介绍
    c# Enum获取name,value和description
    如何成为优秀的软件人才
    关于系统设计分层
    从DLL中加载启动窗体
    摩斯密码
    休息下
    关于博文转载
    整合TextBox与Label 创建新控件EFLabelText
    ProC连接Oracle
  • 原文地址:https://www.cnblogs.com/y611lx/p/14678189.html
Copyright © 2020-2023  润新知