Subversion Repositories bacoAlunos

Rev

Rev 1310 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package pt.estgp.estgweb.web.tags;

import org.apache.struts.taglib.logic.ConditionalTagBase;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.domain.UserSessionImpl;

import javax.servlet.jsp.JspException;

public class IsNotAuthenticatedTag extends ConditionalTagBase
{

    protected boolean condition() throws JspException {
        UserSessionImpl userSession = (UserSessionImpl) pageContext.getRequest().getAttribute(Globals.USER_SESSION_KEY);
        return !(userSession != null && userSession.getUser() != null);
    }


}