user636859
user636859

Reputation:

Spring 3.2 MVC -- HTTP Status 405 Request method 'POST' not supported

I'm getting a 405 error from my Spring 3.2 MVC form. It's telling me POST is not supported, but both my form and controller method use it. Here is the relevant portion of my form.

<form:form commandName="bulletin" method="post" value="/processBulletin">

Here is the relevant portion of my controller.

@RequestMapping(value = "/processBulletin", method = RequestMethod.POST)
    public String processBulletin(
            @ModelAttribute("bulletin") Bulletin bulletin, Model model,
            BindingResult result)

Upvotes: 1

Views: 2576

Answers (1)

digitaljoel
digitaljoel

Reputation: 26584

You don't specify an action in the form so it's likely trying to post to the same URL on which the form is rendered.

The documentation makes no mention of a value attribute.

In your form change value to action and see if that does the trick for you.

Upvotes: 1

Related Questions