Results 1 to 3 of 3

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

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    London
    Posts
    6

    Default <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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    May 2008
    Location
    London
    Posts
    6

    Default 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •