<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Comprar</title>
</head>
<body>
<jsp:include page="autenticar.jsp"></jsp:include>
<h1><CENTER>Bienbenidos a la pagina de Comprar!!</CENTER></h1>
<FORM ACTION="comprar.jsp" METHOD="post">
<SELECT NAME="productos" multiple="multiple" >
<OPTION VALUE="CAM">CAMARAS</OPTION>
<OPTION VALUE="CP">COMPUTADORAS DESKTOP</OPTION>
<OPTION VALUE="AU">AUDIFONOS</OPTION>
<OPTION VALUE="ZAP">ZAPATOS</OPTION>
<OPTION VALUE="CEL">CELULARES</OPTION>
<OPTION VALUE="CPL">LAPTOP</OPTION>
<OPTION VALUE="DE">DISCOS DUROS EXTERNOS</OPTION>
</SELECT>
<BR><BR>
<INPUT TYPE="SUBMIT" VALUE="AGREGAR"><INPUT TYPE="RESET" VALUE="ELIMINAR">
</FORM>
<%
/*Compra compra = new Compra();
HttpSession sesion = request.getSession();*/
Vector misProductos = new Vector();
if (request.getParameter("productos") != null) {
misProductos.addElement(request.getParameter("prod uctos"));
out.println("total: "+ misProductos.size());
out.println("existe");
} else {
out.println("no existe");
}
%>
<a href="menu.jsp">Regresar a Menú</a>
</body>
</html>
En pantalla al obtener el tamaño del vector siempre me muestra 1 aunque yo e seleccionado mas de uno en el formulario, alguien sabe como arreglarlo?
