前台普通form Action方式提交
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form id="loginform" action="login.do" method="post">
用户名<input type="text" name="username" id="username" required autofocus />
密 码 <input type="password" name="password" id="password" placeholder="password" required />
<input type="submit" value="登录">
</form>
</body>
</html>
前台Ajax提交方法
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="e