• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

idempotent methods

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this post:
https://coderanch.com/t/172873/java-Web-Component-SCWCD/certification/Put-idempotent-or-not
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic