日期:2014-05-20 浏览次数:20832 次
public class CeshiToken extends DispatchAction { public ActionForward shezhiToken(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { this.saveToken(request); System.out.println("设置token============================"); //为什么这一行打印出来的是false ????? System.out.println(this.isTokenValid(request)+"~~~~~~~~~~~~~~~~~~~~~"); return mapping.findForward("shezhiToken"); } public ActionForward zhixingFangfa(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println(this.isTokenValid(request)); if(this.isTokenValid(request,true)){ System.out.println("=============执行方法了=============="); this.resetToken(request); } System.out.println("返回去了"); return mapping.findForward("chonghuiyemian"); } }