spring mvc configure custom error pages

How to configure error page in spring

ErrorController.java package com.springdemo; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller @RequestMapping(“/”) public class ErrorController { @RequestMapping(value = “404”,method = RequestMethod.GET) public String Page404(ModelMap model) { return “404”; }…

Read More