Reputation:
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
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