Fehler:
Error processing GroovyPageView: Cannot create a session after the response has been committed
Fehlerhafter Code:
<g:if test="${session.user != null}"> <li><g:link class="home" controller="user" action="logout">Logout</g:link></li> </g:if> <g:else> <li><g:link class="home" controller="user" action="login">Login</g:link></li> </g:else> |
Fehlerfreier Code:
<g:if test="${request.getSession(false) && session.user != null}"> <li><g:link class="home" controller="user" action="logout">Logout</g:link></li> </g:if> <g:else> <li><g:link class="home" controller="user" action="login">Login</g:link></li> </g:else> |