• JSP作业 四——2


    <%@ 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">
    <title>登录页面</title>
    </head>
    <body>
    <form name="myform" method="post" action="a.jsp" >
    <table align="center">
    <tr>
    <td>
    <img src="image/Snap1.jpg"><div style="position:absolute; left: 490px; top: 220px;  400px;">
      <table width="100%" height="100%" border=0 cellPadding=0 cellSpacing=0>
            <tr vAlign=top>
                <td width="23%"
                    height="27" align=right class=bld>用户名: </td>
                <td height="27" align=left><input type="text" size="20" name="u_name"><br>用户名由字母和数字组成</td>
            </tr>
            <tr vAlign=top>
                <td class=bld align=right height=27>密码: </td>
                <td height="27" align=left><INPUT TYPE="password" size="20" name="u_pswd"><br>密码由字母、数字和下划线组成,至少6位</td>
            </tr>
            <tr vAlign=top>
                <td class=bld align=right height=40> </td>
                <td  align=left valign="middle"><a href="#"><input name="submit" type="image" src="image/login.gif" width="101" height="22" border="0" ></a>
                </td>
            </tr>
       </table>
       </div>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    <%@ 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">
    <title>验证页面</title>
    </head>
    <body>
    <%
        String name=request.getParameter("u_name");
        String pswd=request.getParameter("u_pswd");
        if(name.equals("lucky") && pswd.equals("123456")){
            out.print("你好,"+name+"!");
            request.getRequestDispatcher("C.jsp").forward(request, response);
        }else{
            request.getRequestDispatcher("D.jsp").forward(request, response);
        }
    %>
    </body>
    </html>
    

      

    <%@ 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">
    <title>验证成功</title>
    </head>
    <body>
    <h1>验证成功!</h1>
    <h2>你好:
    <%
        String name=request.getParameter("u_name");
        out.print(name);
    %>
    </h2>
    </body>
    </html>
    

      

    <%@ 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">
    <title>验证失败</title>
    </head>
    <body>
    <h1>验证失败!</h1>
    <input type="button" value="重新登录">
    </body>
    </html>
    

      

  • 相关阅读:
    儿童节扣扣讲座心得
    leetcode -- Best Time to Buy and Sell Stock II
    leetcode -- Best Time to Buy and Sell Stock
    JDeveloper中文乱码问题
    Oracle BAM数据量限制64000解决办法
    记录一条纠结了SQL语句
    OEPE创建webservice出现的一些问题
    Oracle OSB [Security:090304]Authentication Failed
    ICommand简单用法
    Oracle BAM添加企业消息源实现数据的实时监控
  • 原文地址:https://www.cnblogs.com/TSHEN/p/12609654.html
Copyright © 2020-2023  润新知