• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

idempotent methods

 
farihah noushene
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
What are the Idempotent methods in HTTP? In HFSJ page 114, it is said put is idempotent put specs says that put need not be idempotent!! Can anyone please clarify?
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this post:
http://www.coderanch.com/t/172873/java-Web-Component-SCWCD/certification/Put-idempotent-or-not
 
Paul Santa Maria
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a quote that might help:
The differences between GET and POST are quite subtle, but the effects are important and can very seriously influence your application. When you fill a form and click a submit button, that typically results in a POST, where the parameters are fairly secure, while clicking on a link usually causes a GET, where the params are sent on the URL. The important thing to remember is that a GET can be bookmarked, a web crawler (e.g. Google) only follows GET URIs, etc. In general, if you are performing what is known as an "idempotent" action, you use GET, otherwise use POST. Idempotent means that you can repeatedly click on that item and the exact same result occurs, i.e. clicking on that button twice doesn't mean you get two Porches delivered to your door!

Interestingly, this is a criticism of JSF since it only supports POST. The result is that no JSF pages can be bookmarked, and no JSF page can be crawled, with all the associated backbutton problems that arise because of this (including multiple deliveries of Porches).

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21930409.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic