Rev 1390 |
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.utils.Globals;
import pt.estgp.estgweb.domain.UserSessionImpl;
import javax.servlet.jsp.JspException;
public class IsAuthenticatedTag
extends ConditionalTagBase
{
@
1.5.0/docs/api/java/lang/Override.html">Override
protected boolean condition
() throws JspException
{
UserSessionImpl userSession =
(UserSessionImpl
) pageContext.
getRequest().
getAttribute(Globals.
USER_SESSION_KEY);
return userSession
!=
null && userSession.
getUser() !=
null;
}
}