This is my code: I figured out the else part of the code causing this error. But i don't understand what is that. Can anyone solve this. Any kind of help suggestion will be appreciated. Thanks
<%@ page import="INCLUDES.DBConnection"%> <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <jsp:useBean id="DB" scope="page" class="INCLUDES.DBConnection"/> <jsp:setProperty name="DB" property="*"/> <% String user_name=request.getParameter("user_name"); ResultSet objRs=null; String statement=""; try { statement="select * from x_master_elearning_user where user_name='" + user_name + "'"; DB.setStatement(statement); objRs=(ResultSet)DB.resultUpdate(); if(objRs.next()) { response.sendRedirect("signup.jsp"); } else { objRs.updateString("user_name",user_name); objRs.updateString("pass_word",request.getParameter("pass_word")); objRs.updateString("first_name",request.getParameter("trainee_name")); objRs.updateString("designation",request.getParameter("designation")); objRs.updateString("email",request.getParameter("email")); objRs.updateString("city",request.getParameter("city")); objRs.updateString("country",request.getParameter("country")); objRs.insertRow(); response.sendRedirect("course_list_index2.jsp"); } } catch(Exception e) { out.print("error occured " + e); } %>