I have two applications that worked perfectly, but without any changes to the code, they do not work anymore.
On the one hand, an application with a JSP doing a POST call and passing two hidden parameters:
<li>
<form name="login" method="post" action="http://dominio.com/aplicacao/chamadaApp">
<input type="hidden" name="param1" value="conteudo1">
<input type="hidden" name="param2" value="conteudo2">
<A href="javascript:login()" class="classe1"></A>
<script type="text/javascript">
function login()
{
document.login.submit();
}
</script>
</form>
</li>
On the other hand, another SpringMVC application with the following code snippet, receiving the above request:
@RequestMapping(value = "/chamadaApp", method = RequestMethod.POST)
public ModelAndView login(
@RequestParam(value = "param1", required = false) String param1,
@RequestParam(value = "param2", required = false) String param2,
WebRequest request) {
//código
}
It worked perfectly, but suddenly the SpringMVC application started to return the HTTP Status 405 - Request method 'GET' not supported error. This makes no sense since both the HTML makes a POST call and the application also expects to receive a POST call.
Investigating a little more, I discovered with FIREBUG that when performing the APp call, before showing the above error, the status is returned: 301 Moved Permanently , which made me suspect some problem below, but I have no idea what it can be.
Does anyone know what this error means and how to solve it?