I am entering student information in an html/jsp form which is invoking the servlet. I find the records inserted into database. However, after executeUpdate(), control is going to catch block. When I tried placing execute()/executeUpdate() in if else block, , control is going to else block but the record is being inserted successfully. Why is the execute() not returning a successful value?