79737559

Date: 2025-08-17 00:21:41
Score: 2.5
Natty:
Report link

As Doug Breaux stated in the comment above, this question https://stackoverflow.com/a/44233134/796761 gives a very easy answer.

I changed my code to this:

req.setAttribute(View.RESPONSE_STATUS_ATTRIBUTE,HttpStatus.MOVED_PERMANENTLY);
return "redirect:/";

And it is working perfectly. Thanks Doug!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): stackoverflow
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Neil