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

前端 未结 8 2007
旧时难觅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:25

    You can use Spring EL in the tag , like this:

    <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
    
    
       YES, you are logged in!
    
    

提交回复
热议问题