201615105027张金文

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
  <head><title>首页</title></head>
  <body>
  <h1>用户登录</h1>
  <form methord="post" action="index.jsp">
    用户名<input name="username" type="text" >
    密码<input name="password" type="password" >
    <input type="submit" value="登录">
    <input type="reset" value="重置">
  </form>

  </body>
</html>
<html>
<head>
    title>登陆后的显示 </title>
</head>
<h2>登录成功</h2>
<jsp:useBean id="user" scope="request" class="demo"></jsp:useBean>
<jsp:setProperty property="*" name="user" />
用户名: <%=user.getUsername() %>
密码:<%=user.getPassword() %>
</head>
<body>

</body>
</html>
public class demo {
    private String username;



    private String password;



    public demo() {

    }



    public String getUsername() {

        return username;

    }



    public void setUsername(String username) {

        this.username = username;

    }



    public String getPassword() {

        return password;

    }



    public void setPassword(String password) {

        this.password = password;

    }
}

在这里插入图片描述
![在这里插入图片描述](https://img-blog.csdnimg.cn/2020092217441491.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ1Njc4MjI0,size_16,color_FFFFFF,t_70#pic_cent

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值