jsp文件
input.jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form>
姓名:
<input name="username" type="text" value="玉米">
<br/>
性别:
<input name="usersex" type="radio" class="sex" value="男" checked>男
<input name="usersex" type="radio" class="sex" value="女">女
<br/>
爱好:
<input name="userhobby" type="checkbox" id="like" value="篮球">篮球
<input name="userhobby" type="checkbox" id="like" value="旅游">旅游
<input name="userhobby" type="checkbox" id="like" value="音乐">音乐
<input name="userhobby" type="checkbox" id="like" value="摄影">摄影
<br/>
E-mail:
<input name="useremail" type="text">
<br/>
<button type="submit" name="submit">submit</button>
<button type="reset" name="reset">全部重写</button>
</form>
</body>
</html>
output.jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
用户输入的信息
<form>
姓名: 玉米
<br/>
性别: 男
<br/>
爱好: 篮球 旅游
<br/>
E-mail: 333@qq.com
<br/>
</form>
</body>
</html>
wrong.jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
您输入的账号密码有误,请重新输入!
<form>
账号:<input type="text" name="username">
<br/>
密码:<input type="password" name="userpassword">
<br/>
<button type="submit" name="submit">登陆</button>
</form>
</body>
</html>
right.jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
您好,tom!
<form>
账号:<input type="text" name="username">
<br/>
密码:<input type="password" name="userpassword">
<br/>
<button type="submit" name="submit">登陆</button>
</form>
</body>
</html>
null.jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
欢迎您,null
<br/>
非正常访问
</body>
</html>