This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes doPut and doHead example... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "doPut and doHead example..." Watch "doPut and doHead example..." New topic
Author

doPut and doHead example...

padhu Vinirs
Greenhorn

Joined: Sep 18, 2002
Posts: 9
Using Tomcat...
I have overridden all of the doXXX methods in a sample servlet. I am printing the method name to the response. I get back the "doGet" message even when I send the method attribute as "PUT" or "HEAD" in the html form call.
Any examples of how to use doPut and doHead ? Havent seen any examples in any book...

Thanks
-- padhu
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
I imagine your first problem is because the browser "knows" that forms have to be either get or post and substitutes GET. You will have to write your own HttpURLConnection to use PUT or HEAD.
Right off hand I don't recall seeing any examples either.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doPut and doHead example...