El error que me lanza hasta el momento es:
javax.servlet.ServletException: java.sql.SQLException: Operation not allowed after ResultSet closed
Código:
String query = "SELECT *FROM cliente WHERE usuario='"+user+"' " + "AND pass='"+pass+"'"; ResultSet rs = (ResultSet) sta.executeQuery(query); if(rs.next()) { String s2 = rs.getString("nombre"); request.getSession().setAttribute("usuario", s2); response.sendRedirect(response.encodeRedirectURL("Resultados.jsp")); } String query2 = "SELECT *FROM producto"; ResultSet rs2 = (ResultSet) sta.executeQuery(query2); if(rs.next()) { String s3 = rs.getString("detprod"); request.getSession().setAttribute("usuario", s3); response.sendRedirect(response.encodeRedirectURL("Electronica.jsp"));; } rs2.close(); rs.close(); sta.close();