Token为null的问题
public ActionForward preparedInsert(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
saveToken(request);
HttpSession session = request.getSession();
if (session != null) {
String token = (String) request
.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
System.out.println(token);
}else{
System.out.println("session is null");
}
return mapping.findForward("insert");
}
在进入插入页面之前我先到插入准备过程,但是打印token为null,怎么回事呀。我也刚接触,谢谢大家帮忙下