今天用Servlet制作一个登入页面,首先新建一个文件夹
导入jar包
登录名为hualili密码是123,登录成功会跳转页面显示欢迎来到用户管理系统,如密码或用户名错误会显示登入失败
index.jsp中代码
<%--
Created by IntelliJ IDEA.
User: micky
Date: 2019/9/25
Time: 10:38
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
<form method="post" action="/login">
用户名:<input name="username" type="text"/>
密码:<input name="password" type="password">
<input type="submi