package sunyang.vote.action.interceptors; import java.util.Map; import sunyang.vote.domain.Admin; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; @SuppressWarnings("serial") public class SessionInterceptor extends AbstractInterceptor { private static final Object LOGIN_KEY = "admin"; public static final String LOGIN_PAGE = "loginPage"; @Override public String intercept(ActionInvocation actionInvocation) throws Exception { Map session = actionInvocation.getInvocationContext().getSession(); Admin admin = (Admin) session.get(LOGIN_KEY); if (admin != null) { return actionInvocation.invoke(); } else { return LOGIN_PAGE; } } }

青梧inn LV3
2022年4月4日
xfcghjk LV1
2022年3月15日
zhaimaliu LV1
2021年12月31日
漫长的白日梦 LV8
2021年12月8日
liuyanmei LV3
2021年5月19日
zzz115 LV1
2021年3月23日
kong.yee LV40
2020年8月29日
DreamYoYo LV2
2020年8月7日
zhaoxiangli LV2
2020年7月7日
yuchen0623 LV1
2020年6月24日

xiquyiyuan LV10
4月12日
zolscy LV24
2024年12月9日
geekcjj LV18
2024年11月9日
2858182479 LV1
2024年11月1日
m5433660 LV1
2024年10月24日
FAST_98C4
2024年9月9日
暂无贡献等级
2411307984 LV1
2024年5月12日
qibodong LV15
2024年4月17日
wananall LV13
2024年3月13日
fffffffanan LV1
2024年3月1日