Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8236255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:05:01+00:00 2026-06-07T19:05:01+00:00

I have a Spring MVC web app. In it a form with a button

  • 0

I have a Spring MVC web app. In it a form with a button that’s supposed to delete a resource from another resource:

<td>
    <form action="/product-bases/${productBase.id}/positions/${position.id}" method="DELETE">
        <input type="submit" value="delete" />
    </form>
</td>

My controller:

@Controller
@RequestMapping(value = "/product-bases/{id}/positions")
public class ProductBasePositionController {

    @RequestMapping(value = "/{positionId}", method = RequestMethod.DELETE)
    public ModelAndView delete(@PathVariable Integer productBaseId, @PathVariable Integer positionId) {

So in theory the server should route to the controller. But alas it does not, hence the post 😉

I’m getting

HTTP Status 405 - Request method 'GET' not supported

type Status report

message Request method 'GET' not supported

description The specified HTTP method is not allowed for the requested resource (Request method 'GET' not supported).
Apache Tomcat/7.0.19

Obviously I don’t have a get for /positions/id defined yet, but why should I, I want to do a delete for now..

(I’m also trying to run this from my spring-test-mvc framework on a mock servlet without any tomcat implementation in between and it gives me a 400 – bad request..
)

So what am I missing here?

Oh, just to cut some corners: post and get will work for other resources, so the rest of my setup is fine.

The booting server even tells me:

RequestMappingHandlerMapping [INFO] Mapped "{[/product-bases/{id}/positions/{positionId}],methods=[DELETE],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.web.servlet.ModelAndView our.view.controller.ProductBasePositionController.delete(java.lang.Integer,java.lang.Integer)

Anyone as confused as I am? If less so, please enlighten me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:05:02+00:00Added an answer on June 7, 2026 at 7:05 pm

    Forms can be submitted via GET or POST only (maybe also PUT, but I doubt that is widely implemented), as form submission requires a method where data is transmitted to the server.

    The DELETE method does not have a request body, so specifying it in a form action is unsupported.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a spring web app that uses Hibernate and Velocity. It's an MVC
I have configured in following way that spring MVC app using Spring 3.1.1.RELEASE web.xml
We have a Spring MVC web app (WAR) deploying to Tomcat (6.0.35) that launches
I have to implement validations for a web app that uses Spring MVC 3.
I have a Spring Web MVC application that I'd like to serve a large,
I have a localized spring mvc based web application, that has an externalized messages
So I have a spring mvc web application that I built in IntelliJ 9,
I have an iPad app that submits orders to an ASP.NET MVC web site
i have an asp.net mvc app that has a form that uploads a file.
I have a Spring MVC web app running on my server. Recently I wanted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.