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

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

    Here's how I am doing this:

    <%@ page import="org.springframework.security.context.SecurityContextHolder" %>
    
    
        
    
    

    Let me know if this works for you too...

    -aj

提交回复
热议问题