Currently, the Java Java web application maps specific error codes to the error servlet (spring web stream, actually, but this should be beyond the point) by doing this in web.xml:
<error-page> <error-code>500</error-code> <location>/spring/error?error=500</location> </error-page> <error-page> <error-code>404</error-code> <location>/spring/error?error=404</location> </error-page>
However, in some cases, the server will still crash and provide a stack trace dump of some exceptions to the user. (Works in IBM WebSphere btw). Then my question is; is it possible to determine the return error page to be used if all other errors do not match? So we guarantee that under any circumstances we won’t get a stack trace.
Rune aamodt
source share