• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is difference between doPut() and doPost()?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is difference between doPut() and doPost()?

people said:" doPost --- used to transfer client information to the server
doPut --- used to provide a new or replacement document to be stored on the server ".

what the problem is , doPost still can store data on the server, for example, use serialized bean or database.

please correct me.

Thanks.
 
Vijay Albuquerque
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A PUT request is used to publish a resource on a server and associate it with the Request URI.
Eg. Suppose a file new.html is PUT on a server using the request URI http://www.testserver/old.html, the server stores new.html in the file system and associates 'http://www.testserver/old.html' to new.html
The file name is independent of the associated URI.

POST is used to transfer data to the server for processing.


VJ
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic