permaculture playing cards*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Using Put request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Using Put request" Watch "Using Put request" New topic
Author

Using Put request

Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
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?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
PUT and DELETE can not be used with forms. For some further information, have a look here and here.


Ping & DNS - my free Android networking tools app
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
That means I cant send a put request to the server?How else can I send a document to the server?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Put request
 
Similar Threads
Generate HTTP PUT request
POSTing from servlet to JSP
JSP doubt
select a row
Core Java Data Objects by Sameer Tyagi et al