• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

doPut() and HTTP PUT

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5397
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
erm just override HttpServlet.doput()?
 
R K Singh
Ranch Hand
Posts: 5397
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5397
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic