good night!
I have three String String cosa1 = request.getParameter("cosa1").toString(); -> SALIDAS con números aleatorios (**LOS NÚMEROS SON IDS DE PRODUCTOS**): 4,3 - 3,4,5 - 1,5,4
I want to pass that data to three INT fixes in Java, I try this and it does not work:
String cosa1 = request.getParameter("cosa1").toString();
String cosa2 = request.getParameter("cosa2").toString();
String cosa3 = request.getParameter("cosa3").toString();
int cosa_1 = Integer.parseInt("cosa1");
int cosa_2 = Integer.parseInt("cosa2");
int cosa_3 = Integer.parseInt("cosa3");
Send me the following error:
org.apache.jasper.JasperException: Ha sucedido una excepción al procesar la página JSP /registro/18-paso-23.jsp en línea 35
32: String cosa1 = request.getParameter("cosa1").toString();
33: String cosa2 = request.getParameter("cosa2").toString();
34: String cosa3 = request.getParameter("cosa3").toString();
35: int cosa_1 = Integer.parseInt("cosa1");
36: int cosa_2 = Integer.parseInt("cosa2");
37: int cosa_3 = Integer.parseInt("cosa3");
I hope you can help me, I already try and I can not get my array of integers.