FAQ Database Discussion Community


Override Spring form error messages

java,spring,default,custom-errors
In Spring how do I override default form error massages ? I'm using a Validator and a properties file to add my own error messages, but how do I override messages that get printed on conversion/encoding error for example ? They seem to be generated automatically and I don't think...

Set up 2 different custom error pages for 2 different parts of 1 website

c#,asp.net,custom-error-pages,custom-errors
Currently I'm having 1 custom error page for my whole ASP .NET site: <system.web> <customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPage.aspx" /> </system.web> However, I would like to set up 2 different error pages, so that error on different part of the side will cause redirection to different error pages. For example: When users...

How do I catch the http status code of server errors into a generic custom error view in ASP.NET MVC

asp.net-mvc,error-handling,custom-errors
I am trying to implement a general custom error page in ASP.NET MVC 4. I basically set up an Error Layout, which defines a section for outputting the http status code of the response. The view that I want my errors to end up at inherits such layout, and simply...

ASP.NET MVC5 Custom Errors hitting 500 instead of 400, 403 or 404

c#,web-config,asp.net-mvc-5,elmah,custom-errors
I have setup Custom Errors for my site as my Web.config shows below: <system.web> <customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error/Error400"> <error statusCode="400" redirect="~/Error/Error404"/> <error statusCode="404" redirect="~/Error/Error404" /> <error statusCode="403" redirect="~/Error/Error403" /> <error statusCode="500" redirect="~/Error/Error500" /> </customErrors> </system.web> And also <system.webServer> <httpErrors errorMode="Custom"...