<%
if(...)
{
out.print("你的密码不正确!");
out.close();
}
else
{.....}
%>
<html>
<form>
......
.....
</form>
</html>
或者是
<%
if(...)
{.....}
else
{
%>
<html>
<form>
......
.....
</form>
</html>
<%
}
%>