I tired to set error-page parameter in AbstractAnnotationConfigDispatcherServletInitializer.onStartup
method.
I expect this is equivalent to:
<error-page>
<error-code>403</error-code>
<location>/accessDenied.html</location>
</error-page>
I'm find class StandardContext
that allow set error page via method addErrorPage
. But i'm don't know how to get this class in onStartup
method, or how to create new StandardContext
and attach it to my app.
Perhaps, this is incorrect way, but i find only this. I'll be glad for any help.