连接器里Action.LOGIN(String com.opensymphony.xwork2.Action.LOGIN = "login")
该在哪里设置才能令连接器return Action.LOGIN访问这个连接,原文地址:http://hi.baidu.com/lnyoao/item/cf559230dff10694c3cf29ef
public class LoginInterceptor extends AbstractInterceptor
{
public String intercept(ActionInvocation invocation) throws Exception
{
if(LoginAction.class == invocation.getAction().getClass())
{
return invocation.invoke();
}
Map map = invocation.getInvocationContext().getSession();
if(null == map.get("userInfo"))
{
return Action.LOGIN;}
return invocation.invoke();
}
}
该在哪里设置才能令连接器return Action.LOGIN访问这个连接,原文地址:http://hi.baidu.com/lnyoao/item/cf559230dff10694c3cf29ef
public class LoginInterceptor extends AbstractInterceptor
{
public String intercept(ActionInvocation invocation) throws Exception
{
if(LoginAction.class == invocation.getAction().getClass())
{
return invocation.invoke();
}
Map map = invocation.getInvocationContext().getSession();
if(null == map.get("userInfo"))
{
return Action.LOGIN;}
return invocation.invoke();
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货