Hi I received next error during the redirect:
The request sent by the client was syntactically incorrect
URL which browser show
In my case, it was also a problem of conversion, Spring was expecting an Integer however I was entering a String. Try to check what you have passed as parameters to the controller
In my case the reason of this error was that browser (Chrome, in my particular case) was sending the date
from the <input type="date" ... />
to the server in the wrong format so server didn't know how to parse it.
In cases like this it is very useful to have org.springframework.web
loggin level set to DEBUG
in log4j configuration
<logger name="org.springframework.web">
<level value="DEBUG" />
...
</logger>
E.g. when parameter is missing or cannot be converted to the required type there will be an exception details in the log.
As said ike3, using the detailed log aided a lot to find the solution for me. In my case it was a mismatch between @PathVariable without name specified, and the variable itself.
Something like this:
@RequestMapping("/user/{uname}")
public String doSomething(@PathVariable String username) { ...
Note the difference between "uname" and "username" ! There was an exception internally that wasn't raised and I couldn't see it until I set the log to INFO level.