This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

PUT method is not working in Tomcat

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Friends,
Can any one tell me how to use PUT method in Tomcat webserver.
I have one HTML file where I've written a code
<form method="PUT" action="servlet/PutEX">
where "PutEx" is my servlet which is has a method

doPut(HttpServletRequest req, HttpServletResponse res){
}
I am using this method to upload a file, but its not working
Please let me inform whether this method is Server specific or I am doing something wrong.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anant,
This is more something for the Tomcat forum. I'll move it there. In any case, this is certainly not server-specific and it should work. Unfortunately you give few details on what is (not) happening -- do you get exceptions; if yes, what's the stack trace? Doesn't the method get called? Does a GET get through to your servlet?
- Peter
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
File uploads are a bit more special than just regular forms. Search both the servlets and apache/tomcat forums for more information. And post back some more details. For example: Does the PUT method not get called at all, or is it the file upload that fails?
 
I will suppress my every urge. But not this shameless plug:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic