zoukankan      html  css  js  c++  java
  • 暑假总结04

    (1)本周学习内容(Oracle)

      Oracle连接eclipse

        制作简单的登陆注册

          

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <meta http-equiv="Pragma" content="no-cache"> 
    <meta http-equiv="Cache-Control" content="no-cache"> 
    <meta http-equiv="Expires" content="0">
    <title>登陆</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/common.css" />
    <link rel="stylesheet" href="css/font-awesome.min.css" />
    </head>
    	<body>
    		<div class="wrap login_wrap">
    			<div class="content">
    				<div class="logo"></div>
    				<div class="login_box">	
    					
    					<div class="login_form">
    						<div class="login_title">
    							登陆•
    						</div>
    						<form action="${pageContext.request.contextPath}/loginServlet" method="post">
    							
    							<div class="form_text_ipt">
    								<input name="username" type="text" placeholder="用户名">
    							</div>
    							<div class="ececk_warning"><span>用户名不能为空</span></div>
    							<div class="form_text_ipt">
    								<input name="password" type="password" placeholder="密码">
    							</div>
    							<div class="ececk_warning"><span>密码不能为空</span></div>
    							<div class="form_check_ipt">
    								<div class="left check_left">
    									<label><input name="" type="checkbox">下次自动登陆•</label>
    								</div>
    								<div class="right check_right">
    									<a href="#">忘记密码</a>
    								</div>
    							</div>
    							<div class="form_btn">
    								<input type="submit" value="登陆" />
    							</div>
    							<div class="form_reg_btn">
    								<span>还没有账号?</span><a href="create.jsp">马上注册</a>
    							</div>
    						</form>
    					</div>
    				</div>
    			</div>
    		</div>
    		<script type="text/javascript" src="js/jquery.min.js" ></script>
    		<script type="text/javascript" src="js/common.js" ></script>
    		<div style="text-align:center;">
    </div>
    	</body>
    </html>
    

      

    package com.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;
    
    import com.dao.domain;
    import com.user.User;
    
    /**
     * Servlet implementation class loginServlet
     */
    @WebServlet("/loginServlet")
    public class loginServlet extends HttpServlet {
    	private static final long serialVersionUID = 1L;
           
        /**
         * @see HttpServlet#HttpServlet()
         */
        public loginServlet() {
            super();
            // TODO Auto-generated constructor stub
        }
    
    	/**
    	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
    	 */
    	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    		request.setCharacterEncoding("utf-8");
    		response.setContentType("text/html;charset=utf-8");
    		String username = request.getParameter("username");
    		String password = request.getParameter("password");
    		
    		domain domain = new domain();
    		User user = null;
    		try {
    			user=domain.login(username, password);
    			
    			if(user == null) {
    				request.setAttribute("msg", "用户或密码不正确");
    				request.getRequestDispatcher("/login.jsp").forward(request, response);
    				return;
    			}
    			request.getSession().setAttribute("user", user);
    			
    			response.sendRedirect(request.getContextPath()+"/index.jsp");
    		} catch (Exception e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    	}
    
    	/**
    	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
    	 */
    	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    		// TODO Auto-generated method stub
    		doGet(request, response);
    	}
    
    }
    

      

    /* CSS Document  */
    @charset "UTF-8";
    body{font-family:"宋体", Arial,Verdana, sans-serif, Helvetica;font-size:12px;margin:0;background:#f4f5eb;color:#000;}
    dl,ul,li{list-style:none;}
    a img{border:0;}
    a{color:#000;}
    a:link,a:visited,a:active,a:hover{text-decoration:none;}
    a:hover{cursor: pointer;}
    .clearboth {clear:both;font-size:0px;}
    input {vertical-align:middle;}
    body,html{height:100%;}
    .noneBox {display:none;}
    /*----ͷ---------------------------*/
    .header{100%;height:53px;background:url(../images/header_bei.gif);}
    .header01{float:left;height:53px;45px;margin-left:15px;background:url(../images/header01.gif) no-repeat;}
    .header02{float:left;height:28px;auto;margin-left:10px;padding-top:25px;font-size:20px;font-family:"黑体";}
    .header03{float:right;height:53px;67px;margin-right:15px;background:url(../images/logo.gif);}
    /*----left---------------------------*/
    .left{float:left;214px;height:auto;margin:8px 0 8px 8px!important;margin:8px 0 4px 4px;}
    .left01{214px;height:33px;background:url(../images/left01_bei.gif) repeat-x;margin-bottom:8px;}
    .left01_left{float:left;height:33px;3px;background:url(../images/left01_left.gif);}
    .left01_right{float:right;height:33px;3px;background:url(../images/left01_right.gif);}
    .left01_c{float:left;height:33px;line-height:33px;198px;padding-left:10px;color:#002f76;}
    .left01_c img{height:17px;17px;margin:3px 10px 0 0;}
    .left02{214px;height:auto;margin-bottom:8px;}
    .left02top{214px;height:36px;background:url(../images/left02_bei.gif) repeat-x;}
    .left02top_left{float:left;height:36px;3px;background:url(../images/left02_left.gif);}
    .left02top_right{float:right;height:36px;3px;background:url(../images/left02_right.gif);}
    .left02top_c{float:left;height:36px;line-height:33px;198px;padding-left:10px;font-weight:bold;}
    .left02down{212px;height:auto;border:1px solid #b4b4b4;border-top:0;background:#fff;}
    .left02down01{202px;height:27px;line-height:27px;padding-left:10px;}
    .left02down01_img{float:left;7px;height:27px;margin-right:5px;background:url(../images/01.gif) no-repeat;}
    .left02down01_xia ul{margin:0;padding:0 5px 0 19px;}
    .left02down01_xia li{auto;height:20px;line-height:20px;margin:3px 0;padding-left:2px;}
    .left02down01_xia_li{background:#eff6ff;} 
    .left03_right{float:right;height:33px;30px;background:url(../images/03.gif);}
    .left03_c{float:left;height:33px;line-height:33px;171px;padding-left:10px;color:#002f76;}
    /*----rrcc-------------*/
    .rrcc{auto;height:90%;margin:8px 8px 8px 222px;}
    /*----center---------------------------*/
    .center{float:left;height:200px;8px;margin-left:8px!important;margin-left:4px; background:url(../images/center0.gif) no-repeat;cursor:pointer;}
    
    
    /*----right---------------------------*/
    .right{auto;height:90%;margin-left:20px!important;margin-left:10px;border:1px solid #b4b4b4;background:#fff;}
    .right span{color:#666;}
    .right01{padding-left:10px;margin:9px 0;}
    .right01 #cent{ 200px;height: 200px;background-color: red;}
    

      

      花在学习时长20小时,10小时在学习视频,其他在整理视频笔记和代码  

    (2)下周准备学习Oracle安装虚拟机

    (3)本周遇到的问题

      页面的样式不美观

        

  • 相关阅读:
    数据结构【图】—022邻接矩阵的深度和广度遍历
    第一百三十一天 how can I 坚持
    第一百三十天 how can I 坚持
    第一百二十九天 how can I坚持
    第一百二十八天 how can i 坚持
    第一百二十七天 how can I 坚持
    第一百二十六天 how can I 坚持
    第一百二十五天 how can I坚持
    第一百二十四天 how can I坚持
    第一百二十三天 how can I 坚持
  • 原文地址:https://www.cnblogs.com/0710whh/p/9617901.html
Copyright © 2011-2022 走看看