login.html
<form action="login.jsp" method="post">
<p><strong>账号:</strong></p>
<input type="text" name="account"/>
<p><strong>密码:</strong></p>
<input type="password" name="password"/>
<br/>
<input type="reset" value="重置"/>
<br/>
<input type="submit" value="登录"/>
</from>
login.jsp
<%
String account = request.getParameter("account");
String password = request.getParameter("password");
if( !account.equals("") && !password.equals(""))
{
%>
<center>欢迎你回来<br/><strong><%=name%>同学</strong></center>
<%
}else{
%>
<center><strong>对不起</strong><br/>请先输入账号和密码!</center>
<%
}
%>