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

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

    the simplest i used to code this...

    <%
    if (request.getRemoteUser()== null) {%>  
        
    <%}%>
    

提交回复
热议问题