• 4.14


    
    
    public class tea {
        private int uid;
        private String uname;
        private String upass;
        //访问器
        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 getUpass() {
            return upass;
        }
        public void setUpass(String upass) {
            this.upass = upass;
        }
        //构造器
        public tea(int uid, String uname, String upass) {
            super();
            this.uid = uid;
            this.uname = uname;
            this.upass = upass;
        }
        public tea() {
            super();
        }
        
        
        
        
        
    }
    
    
    
    body {
      margin:0;
      height:1080;
      1920;
      background-image:url(beijing.png);
      background-repeat:no-repeat;
    }
    
    ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
    position: fixed;
    top: 0;
     100%;
    }
    
    li {
    float: left;
    }
    
    li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    }
    
    li a:hover:not(.active) {
    background-color: #111;
    }
    
    p {
      text-align:center;
    }
    
    
    .active {
    background-color: #4CAF50;
    }
    
    .form {
      350px;
      height:200px;
      background-color:rgba(1,0,1,0.5);
    }
    
    .weizhi {
      position:relative;
      top:200px;
      left:610px;
    }
    .up {
      position: relative;
      top:150px;
    }
    <%@page import="com.gd.dao.StuDao"%>
    <%@page import="com.gd.bean.Stu"%>
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
        Stu s = new Stu();
        
        String uname = request.getParameter("uname");
        s.setUname(uname);
        String upwd = request.getParameter("upwd");
        s.setUpwd(upwd);
        
        StuDao sd=new StuDao();
        if(sd.addStu(s)>0){
            //跳转注册成功页面 
            request.getRequestDispatcher("welcome.jsp").forward(request,response);
        }else{
            //错误页面 
            request.getRequestDispatcher("no.jsp").forward(request,response);
        }
        
        
        
    %>
    <%@page import="com.gd.dao.stuDao"%>
    <%@page import="com.gd.bean.stu"%>
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
        stu s = new stu();
        int id = Integer.parseInt(request.getParameter("sid"));
        s.setSid(id);
        String uname = request.getParameter("uname");
        s.setUname(uname);
        String upwd = request.getParameter("upwd");
        s.setUpwd(upwd);
        stuDao sd=new stuDao();
        if(sd.addstu(s)>0){
            //跳转注册成功页面 
        }else{
            //错误页面 
        }    
    %>
    <%    
        if(uname.equals("zs")&&upwd.equals("123")){
        //跳转成功登录页面
        request.getRequestDispatcher("welcome.jsp").forward(request, response);
        session.setAttribute("uname",uname);
        }
        else{
        //错误页面
        request.getRequestDispatcher("index.jsp").forward(request, response);
        }
    %>
  • 相关阅读:
    漫谈:机器学习中距离和相似性度量方法
    逻辑回归Logistic Regression 之基础知识准备
    从随机过程到马尔科夫链蒙特卡洛方法
    ICLR 2016
    [转]Wireshark抓包工具--TCP数据包seq ack等解读
    网络学习资源
    Data obtained from ping: is it round trip or one way?
    【转】 一张图看懂开源许可协议,开源许可证GPL、BSD、MIT、Mozilla、Apache和LGPL的区别
    How To Configure a Redis Cluster on Ubuntu 14.04
    redis connetced refused remote
  • 原文地址:https://www.cnblogs.com/wudongyang521/p/14676939.html
Copyright © 2020-2023  润新知