I\'m looking for a clean way to return customized 404 errorpages in Spring 4 when a requested resource was not found. Queries to different domain types should result in diff
modified your web.xml file.Using following code.
App Name 500 /error500.jsp 404 /error404.jsp
Access this by following code.
response.sendError(508802,"Error Message");
Now add this code in web.xml.
508802 /error500.jsp