• 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

Using Put request

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I use put request?Can I give the method in form as put?In that case how will I send the resource, which I want to put on the server?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PUT and DELETE can not be used with forms. For some further information, have a look here and here.
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That means I cant send a put request to the server?How else can I send a document to the server?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can most definitely use PUT, just not from inside an HTML form. As the articles I linked to mention, there are several options for the client side, e.g. Jakarta Commons HttpClient (or even java.net.HttpUrlConnection) or the XmlHttpRequest in JavaScript (although JavaScript can't interact with files, of course). On the server side you can use the standard servlet API (the HttpServlet class has doXYZ methods for all HTTP methods, including PUT and DELETE).

Other ways of handling files on the server would be WebDAV, which is shipped with Tomcat, or the standard HTTP file upload described here.
[ January 03, 2007: Message edited by: Ulf Dittmer ]
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic