那你改成这样试试
<td width="79"><input name="action" type="submit" value="Login"></td>
<td width="82"><input name="action" type="submit" value="Register"></td>
然后再作一次判断,如果action是login则转向你说的SERLVLET,如果是Register则转向注册JSP那个页面
<td width="79"><input name="action" type="submit" value="Login"></td>
<td width="82"><input name="action" type="submit" value="Register"></td>
然后再作一次判断,如果action是login则转向你说的SERLVLET,如果是Register则转向注册JSP那个页面
request.getParameter("submit")
非空且等于"Sign in"是条一个request.getParameter("submit2")
非空且等于"Register"则执行第二个
<input name="submit" type="button" value="Sign in" onclick="fun1()">
<input name="submit2" type="button" value="Register" onclick="fun2()">在javascript里处理fun1(),fun2()可以提交到不同页面,也可以加一个<input type=hidden ...>的标志判断提交方向
jsp那个用<input type="button" onclick="window.location='a.jsp'">
<script>
funtion send(object)
{
form1.action="register.jsp";
form1.submit();
}
</script>