Colocar 2 botones en JSP

edomorales
28 de Octubre del 2003
Necesito colocar 2 botones en JSP, cada uno debe llamar otro programa JSP.
el programa que tengo en mas o menos asi

<%@page language = "java"%>
<%@ page import="java.sql.*"%>

<BODY BGCOLOR="white">
<form action ="xx.jsp" method="post">

<table width="100%"border="0"cellspacing="1"cellpadding="3">

<tr bgcolor="#FFFFFF">
<td colspan="7" ><B> INFORME RESUMIDO </B></A></FONT><BR>

<%
String usuario="";
String ccosto="";
String existe="";
int tipo=0;
int rango=0;
int agno=0;
int centro_costo=0;
%>
<tr bgcolor="#EEEEFF">
<td width="30%" ><I>Periodo Presupuestario:</b></td>
<td width="70%">
<select name="agno">
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
</select>

<tr bgcolor="#EEEEFF">
<td width="30%" ><I>Tipo Presupuesto:</b></td>
<td width="70%">
<select name="tipo">
<option value=1>Gasto</option>
<option value=2>Inversión</option>
</select>

<input type=hidden name="usuario" value=<%=usuario%>>
<input type=hidden name="agno" value=<%=agno%>>
<input type=hidden name="tipo" value=<%=tipo%>>

</tr>
</table>
</body>
<BR><center>
<input type="submit" name="Submit1" value="Visualizar Excel">
<input type="submit" name="Submit2" value="Visualizar Web">
</center>
</form>
</html>

concorde
28 de Octubre del 2003
La solución más sencilla es poner cada botón en su propio formulario, y que cad formulario llame a la página jsp correspondiente. Tal y como lo tienes ahora los dos botones irán a la misma página.