Hi, I have a project in which in a java class, I did the query to the bd of oracle, I did it of type ResultSet, so that my servlet that works as a controller, could discriminate the result and see where it redirects it , the query only brings a data 0 or 1, the problem is that I do not know how to review the result of the query, the idea is to pass it to a variable and compare with an if the variable that passes the result (n) comes out in red saying as CAN NOT FIND SYMBOL error, I attach the code.
ResultSet rs =consult.getConsultCambioBtnCollectRv(Parametro);
try {
if(rs != null){
while(rs.next()){
int n = Integer.parseInt(rs.getString("collection_required_bool"));
if(n == 0){
response.sendRedirect("test.jsp");
processRequest(request, response);
}else{
response.sendRedirect("test1.jsp");
processRequest(request, response);
}
}
}
} catch (SQLException ex) {
Logger.getLogger(SvrModificaCollectRv.class.getName()).log(Level.SEVERE, null, ex);
}