How to handle HTTP 403 with Spring Security 3.0.x

前端 未结 5 1424
温柔的废话
温柔的废话 2021-02-04 09:44

I\'m facing a little issue with Spring Security 3.0.x (3.0.2 in particular at the moment). The whole application I\'m working on is working perfectly except when someone who doe

5条回答
  •  没有蜡笔的小新
    2021-02-04 10:26

    A cleaner way to handle error redirects is to use the and tags in your web.xml. See below for an example:

    
    
        
            403
            /403.jsp
        
    

    This block of code will redirect to the specified location whenever it encounters the specified error code.

    This eliminates the need for authorization code inside your application logic.

提交回复
热议问题