Hello,
The idompotent methods are
1-Get
2-Put
3-Delete
4-Trace
Idempotent means that is this is happened more than once, it will has the same effect.
Regarding your question about the put method,the put method is not used to store records in the database,it is meant to put files to the server (upload file to a server).So you put the same file twice it will be replaced and the same effect will be acheived.This is the same case for Delete and Trace.
Get method is considered idempotent so
you should not put any code that alters the database in a doGet method.
What is really idempotent is all about (This is the most important point)?
I remember i read in a book called "HTTP the definitive guide" and talked about the idempotency issue in detail in here is the abstract:
You know that Http architecture is request/response.
When you submit the data of a get form,the browser will open a TCP connection with the client and send the request.After the browser sends the request it will wait for the response to come back from the server via and TCP connection.If for somehow the response did not get to the client (for example,network problems) the browser will resend the get request
again.The browser will send requests only if the method type is get,put,delete,trace' and it will not do so for post.
The book HTTP The definitive is really a very helpful book and advice everyone to read this book.
Hope this info is useful