2

If request is an HTTPServletRequest why can I use request.getParameter to get the body for a POST request, but not for a PUT or DELETE request?

winhowes
  • 7,845
  • 5
  • 28
  • 39

1 Answers1

1

By default Put method is disabled as mostly we use Get and Post in regular jsps and servelts. But, it can be easily configure to support it. First, in order to allow Tomcat to accept commands other than HTTP GET and PUT we should add to Tomcat’s web.xml the following init param:

You can follow this below post for more explanation and set up.

http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.html

Prasad
  • 1,089
  • 13
  • 21