首页>代码>JSP三大框架SSH开发天下陶网络商城源代码下载>/天下陶网络商城/Shop/src/com/lyq/action/interceptor/UserLoginInterceptor.java
package com.lyq.action.interceptor; import java.util.Map; import com.lyq.action.BaseAction; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; /** * 管理员登录拦截器 * @author Li Yongqiang */ public class UserLoginInterceptor extends AbstractInterceptor { private static final long serialVersionUID = 1L; @Override public String intercept(ActionInvocation invocation) throws Exception { // 获取ActionContext ActionContext context = invocation.getInvocationContext(); // 获取Map类型的session Map<String, Object> session = context.getSession(); // 判断用户是否登录 if(session.get("admin") != null){ // 调用执行方法 return invocation.invoke(); } // 返回登录 return BaseAction.USER_LOGIN; } }
最近下载更多
2017143155 LV12
2022年4月26日
lzlzyw LV14
2022年3月24日
wanglinddad LV54
2022年2月9日
dy123123 LV8
2022年1月1日
mwk545924364 LV4
2021年12月10日
178174qasw LV10
2021年8月19日
Wang17539231758 LV11
2020年5月27日
林志勇 LV10
2020年5月16日
邱玉豪 LV7
2020年4月24日
仙女小麋鹿 LV6
2019年12月27日
最近浏览更多
崔新坤
3月5日
暂无贡献等级
Henew168 LV2
2023年11月19日
微信网友_6707371254878208
2023年10月25日
暂无贡献等级
hrbylw LV8
2023年1月28日
111114758 LV2
2022年11月27日
2998919365 LV5
2022年10月28日
zhaoyangwfd LV17
2022年10月18日
绘飛的渔
2022年8月2日
暂无贡献等级
dasdascccf LV10
2022年6月16日
2017143155 LV12
2022年4月26日