How do you write a controller method which can either return a View or HTTP response status code based on if its 200 then view else the response status code.
@RequestMapping(value="/",method=RequestMethod.GET)
public String showLanding()
{
return View.Landing;
}
I want to handle in case of 401, 403, 500 etc. just status code should be returned instead of view.