I want to delete record from oracle db, i need alert message saying 'Are you sure you want to delete?' with yes and no buttons, if yes, the data should delete if no control shd be in the same page(retrieve.jsp). I have no idea how to do this...the previous page is retrieve.jsp which has the data, based on form input with edit and Delete button end of each row, when i click delete it shd alert me....This is my servlet code:
There are couple of other things that you can improve even if you are doing example.
1) Do not embed HTML inside the DeleteData. Read about MVC2 and use JSP for that purpose. I guess you are already doing that in retrieve.jsp as you mentioned.
2) Close the database resources in finally block to make sure they are called even if you encounter exception in your code.
Joined: Oct 27, 2010
Thank you for the reply...will try this.
subject: alert in servlet with 'Are you sure you want to delete?'