zoukankan      html  css  js  c++  java
  • jsp第四次作业

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://"
                + request.getServerName() + ":" + request.getServerPort()
                + path + "/";
    %>
    
    <%
        String str = request.getParameter("address");
        String pwd = request.getParameter("password");
        if (null != str) {
            if (str.equals("jy") && pwd.equals("691")) {
                pageContext.forward("a.jsp");
            } else {
                out.println("您输入的账号或密码有误,请重新输入!");
            }
        }
    %>
    
    
    <html>
    <head>
    <form action="" method="post">
        <br> 账号: <input type="text" name="address" size="20"><br>
        密码: <input type="password" name="password" size="21"><br>
        验证码: <input type="text" name="uwv6" size="18"> <img id="yzmtp"
            src="images/1.jpg" width="120px" height="80px" />换一张<br> <input
            type="submit" value="登录" name="a">
    </form>
    </head>
    
    <body style="background:url(images/2.png)";>
    </body>
    </html>
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    
    
    <html>
      <head>
        
      </head>
      
      <body style="background:url(images/2.png)">
            欢迎登录
    <br>
    </body>
    </html>
  • 相关阅读:
    Mac OS X 下安装Raspbian系统
    Tiny4412 uboot Makefile 分析
    Tiny4412增强版底板串口电路与设置
    为Debian搞定Mercury MW150US无线网卡驱动
    树莓派的启动过程
    xml格式转换为Bean
    j2ee之hibernate工具类
    验证码代码
    j2ee之AJAX的二级联动
    j2ee之原生AJAX
  • 原文地址:https://www.cnblogs.com/ydy128/p/14600234.html
Copyright © 2011-2022 走看看