In web service controller errors are displayed in JSON even if the Content-Type is set to text/plain
Check Spring error handling configuration