Tks honeybunny for your fast reply, but I think I was not clear enough in my last post.
In fact the tag ifNotGranted works for me, my problem is that I cannot use both of them at the same time, let me explain:
I have a box in my layout that I want to show a login form, if the user are not logged, or user´s information, if the user are logged in. Something like this:
Code:
<div class="userBox">
<core:choose>
<core:when test="${isUserLogged}">
<form name="f" action="j_spring_security_check" method="POST">
<input type="text" name="j_username" class="campo_user" size="15" value=""/><br />
<input type="password" name="j_password" class="campo_user" value="" size="15" /><br />
<input type="submit" />
</form>
</core:when>
<core:otherwise>
welcome <span><core:out value="${user.name}"/></span>
</core:otherwise>
</core:choose>
</div>
I want to avoid to do that cause I will have to handle if the user are logged and wrap this information to my view in every controller of my application.
I´ve done one attempt to do that using a combination of authorize tags with ifNotGranted and ifAnyGranted attributes, the code in my first post, but I have realised that just the block with ifNotGranted are rendered, even when my user are logged in.
I hope I make myself a little bit more clear now.
Tks in advance.