1

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.

Stewartside
  • 20,378
  • 12
  • 60
  • 81
  • You can find the details here - http://stackoverflow.com/questions/24194724/custom-403-error-page-with-spring-security-configured-via-java-code – Mithun Mar 16 '15 at 11:05
  • I'm alredy watch this link, but it unsuitable for any cases. 403 page is taken as an example. I'm want customize standart error page and for other error codes. For examle: i'm get request from any page and send response with error to the same page. And i'm see standart tomcat error page. I'm want change this. – alexeyIvanov Mar 16 '15 at 11:30

0 Answers0