I am trying to check the form parameter in my spring controller class but getting below error
Invalid request method: Request method 'POST' not supportedException-Message: Request method 'POST' not supportedRequest-Info-----
Current-Request-URL=http://sit-www.hm.com/view/checkout/submitCurrent-Request-URI=/view/checkout/submitForward-Request-Uri=/de/checkout/submitForward-Query-String=nullInclude-Request-Uri=nullInclude-Query-String=nullMethod=POSTRemoteAddr=193.234.233.229--------- Session info"
Java script code :
elements.formCheckout.append($('<input type="hidden" name="New-submit" />'));
Controller class in spring:
@RequestMapping(value = ACTION_SUBMIT, method = POST, params = "New-submit")
public ModelAndView submitOrder(@Valid @ModelAttribute(PATH) CheckoutComponentDTO form, BindingResult result,
HttpServletRequest request, HttpServletResponse response) {
I added param="New-submit" to check in controller class but it is showing
Invalid request method: Request method 'POST' not supportedException-Message.
Please help me on this.