how to conditionally show jsp content to logged in users with Spring security

前端 未结 8 2006
旧时难觅i
旧时难觅i 2020-12-07 12:59

I want to show content to any user that is logged in and to hide if they are not logged in. I\'m using jsp\'s and spring security.

Obviously a home grown solution i

8条回答
  •  清歌不尽
    2020-12-07 13:03

    The current version (3.1 perhaps even earlier) supports var parameters for saving the result into an attribute. By that you can code the following:

    
    
        
            You are logged in
        
        
            You are logged out
        
    
    

提交回复
热议问题