executeUpdate query is not working
int i=ps.executeUpdate(); this line is not working using mvc in jsp String n=request.getParameter("name"); String f=request.getParameter("father"); String m=request.getParameter("mother"); String e=request.getParameter("email"); String c=request.getParameter("contact"); loginbean l=new loginbean(); l.setName(n); l.setFathername(f); l.setMothername(m); l.setEmail(e); l.setContact(c); Class.forName("com.mysql.jdbc.Driver"); out.print("1"); Connection con=DriverManager.getConnection("jdbc:mysql:///mvc","root",""); out.print("2"); PreparedStatement ps=con.prepareStatement("insert into reg (name,father,mother,email,contact) values(?,?,?,?,?);"); out.print("3"); ps.setString(1,l.getName()); ps.setString(2,l.getFathername()); ps.setString(3,l.getMothername()); ps.setString(4,l.getEmail()); ps.setString(5,l.getContact()); out.print("4"); int i=ps.executeUpdate(); out.print("5"); if(i>0) out.print("You are successfully registered..."); } catch ( Exception e) { System.out.println(e); } }