jquery *** 作cookie的话事先下个cookie插件用起来很简单了。
$.cookie("username")调取username
$.cookie("username","yukon")设置username
public class WelcomeController extends AbstractController {@Override
protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
HttpServletResponse arg1) throws Exception {
// TODO Auto-generated method stub
Cookie cookie = new Cookie("test", "test")
cookie.setMaxAge(maxTime)
arg1.addCookie(cookie)
System.out.println("welcome")
return new ModelAndView("welcome")
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)