Forbbiden 403 - Redirect

Asked

Viewed 348 times

0

To display an error message when I receive a 403 error, I would like the error message to be set via an HTML page created by me. Do you have a way to redirect? Using Angularjs or Spring itself?

I’m using Angularjs with Spring, how do I map this?

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Mon Jul 31 15:20:43 BRT 2017
There was an unexpected error (type=Forbidden, status=403).
Access Denied

1 answer

1

You can simply put a custom page inside the folder templates with the name error.html or error.jsp, spring will recognize and display in case of any error.

Within this page you will have access to some variables. Ex.: error, path and message.

Note: The name of the error page should always be error + extension of your template system

Browser other questions tagged

You are not signed in. Login or sign up in order to post.