Rev 1390 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | fvelez | 1 | package pt.estgp.estgweb.web.tags; |
2 | |||
1390 | jmachado | 3 | import org.apache.struts.taglib.logic.ConditionalTagBase; |
1814 | jmachado | 4 | import pt.estgp.estgweb.utils.Globals; |
1390 | jmachado | 5 | import pt.estgp.estgweb.domain.UserSessionImpl; |
1 | fvelez | 6 | |
7 | import javax.servlet.jsp.JspException; |
||
8 | |||
1390 | jmachado | 9 | public class IsAuthenticatedTag extends ConditionalTagBase |
152 | jmachado | 10 | { |
1 | fvelez | 11 | |
12 | |||
13 | |||
1390 | jmachado | 14 | |
15 | @1.5.0/docs/api/java/lang/Override.html">Override |
||
16 | protected boolean condition() throws JspException { |
||
1 | fvelez | 17 | UserSessionImpl userSession = (UserSessionImpl) pageContext.getRequest().getAttribute(Globals.USER_SESSION_KEY); |
152 | jmachado | 18 | return userSession != null && userSession.getUser() != null; |
19 | } |
||
20 | |||
1 | fvelez | 21 | |
22 | } |