jquery - How to Solve POST and GET not Supported Warning in Java? -
in java application i'm sending form when hyperlink clicked.
now wrote code hyper link click event.
<form:form action="demo1" modelattribute="demo"> ----- <a href="href_form1" id="href1" class="save_details">save</a> ------- $('#href1').click(function(){ $("#demo").attr("action", $('.save_details').attr("href")); $("#demo").submit(); });
and controller class
@requestmapping(value = "demo1", method = requestmethod.post) public @responsebody string demo1(demo demo, errors errors, model model)throws exception { -------//some database code }
but i'm getting warning.
warning: request method 'get' not supported
<form:form action="demo1" modelattribute="demo" method="post">
you have specify using post method in form. if don't, used default.
Comments
Post a Comment