Announcement Announcement Module
Collapse
No announcement yet.
<form:form method="DELETE" ... > Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <form:form method="DELETE" ... >

    Hello

    I am new to spring MVC, and I am trying to set up a small application to understand the framework.

    I would like to experiment other HTTP methods than GET and POST. I have tried to set up the following form in my view:

    Code:
    <form id="command" action="myPage.htm" method="DELETE">
    	<input type="submit" value="Delete" />
    </form>
    This does not work. When I click on the "Delete" button, the server receive a GET rather then a DELETE...

    I use
    • Tomcat v6.0
    • jre1.6.0_03
    • spring-framework-2.5.3

    Is there anything special to set up to support DELETE / PUT / etc?

    Thank you for any help

    Best regards

    Nicolas

  • #2
    You cannot. The only 2 supported methods on a form are GET & POST. If you type in anything elkse then POST you will get a GET (which is what is happening in your case).

    Comment


    • #3
      Thanks

      Thank you very much for the quick reply.

      I was curious about this after reading about REST. But I guess I took this out of context, see the quote below wikipedia:
      The other HTTP methods (i.e. other than GET and POST) are not available in HTML 4.1 or XHTML 1.0.
      Sorry for the dumb question.

      Comment

      Working...
      X