用getSession()调用时间

//存储时间

request.getSession().setAttribute("tiam2",itemList);

//调用时间

String tiam2 = (String) request.getSession().getAttribute("before_Recode_Date");
SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String date = sDateFormat.format(new java.util.Date());

猜你喜欢

转载自www.cnblogs.com/redrian/p/10118442.html