简体   繁体   English

无法识别Grails g:ifLoggedIn标记

[英]Grails g:ifLoggedIn tag not recognised

When the user successfully logs into the system i want to display the LOGOUT link. 当用户成功登录系统后,我要显示LOGOUT链接。 And if the user has not logged into the system i want to display LOGININ link. 如果用户尚未登录系统,我想显示LOGININ链接。

It says that <g:ifLoggedIn> is not recognised. 它说<g:ifLoggedIn>无法识别。 I am using grails 2.2.4 我正在使用grails 2.2.4

<li class="dropdown" id="menuLogin"><g:ifLoggedIn>
                        <a class="dropdown-toggle" href="#" data-toggle="dropdown"
                            id="navLogin">Login</a>
                    </g:ifLoggedIn> <g:ifNotLoggedIn>
                        <a class="dropdown-toggle" href="#" data-toggle="dropdown"
                            id="navLogin">LOGOUT</a>
                    </g:ifNotLoggedIn>

Use this tag if you use spring-security-core plugin 如果您使用spring-security-core插件,请使用此标签

<sec:ifLoggedIn></sec:ifLoggedIn>

instead of 代替

<g:ifLoggedIn></g:ifLoggedIn> // there is no such tag in g namespace

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM