aspose file tools*
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
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: 39548
    
  27
PUT and DELETE can not be used with forms. For some further information, have a look here and here.


Ping & DNS - updated with new look and Ping home screen widget
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: 39548
    
  27
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 ]
 
wood burning stoves
 
subject: Using Put request
 
Similar Threads
JSP doubt
Core Java Data Objects by Sameer Tyagi et al
select a row
Generate HTTP PUT request
POSTing from servlet to JSP