The history: history
The problem is I cannot delete customer from the database. I can create a new customer, but if I leave blank the fields it create an empty record in
Looks like you are not setting the ID in the list
while(rs.next()){
list.add(rs.getString("ID")); // Add this
list.add(rs.getString("CNAME"));
list.add(rs.getString("ADDRESS"));
list.add(rs.getString("PHONENUMBER"));
}
Without ID in the list , you wont be able to access the same from the jsp and the same wont be available when you call the delete method.
Another thing is make sure that the ID is string and not int . Usually we keep the key (i.e ID here ) as integer.