• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doPut() and HTTP PUT

 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
What is the HTTP PUT method for? How do I implement it using doPut()?

Thanks for ur Help
Reda
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
doPut() is used to handle for put request which is coming to the web server.
As far as coding is concern never used this.
 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I was searching some info on doPut() method OR to be specific how to use PUT method of HTTP.
I searched the google also ... but what I found that u have to change the configuration of Tomcat to make it accept PUT method (it did not tell the version and how to do it )
Anyone
How to use PUT of HTTP with HttpServlet ?
TIA
 
Andre Mermegas
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
erm just override HttpServlet.doput()?
 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thanks Andre
but ........ what is the difference between Post and Put method?
I read Put is used to put some resources like file etc on server.
so what should I do in doPut()? What will be I getting in Request object?
TIA
 
vasu maj
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put is basically to export files to the server. it works exactly opsite to the get mechanism. correct me if i am wrong.
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The use of an HTTP PUT/DELETE is not widely supported due to complicated policy/security restrictions. From what I understand, the PUT operation is similar to sending a file via FTP. When you upload a file, you must configure the server to allow this (setting folder permissions to write/delete, etc). For the implementation, your method receives the same values as other method signatures within HttpServlet:
doPut(HttpServletRequest req, HttpServletResponse resp)
There truly isn't much in the way of documentation for these methods, nor examples of proper usage. Here is a link to the RFC specs that will give you about as much info as you're probably going to get. The link will also directly answer your question on POST vs PUT.
 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THanks guys
Now let us for a second stop R&D.
Would some one plz tell me what type of question one gets regarding PUT/HEAD/DELETE ?
TIA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic