tomcat session cookie 值设置,tomcat jsessionid设置
##调用request.getSession()
@Controller
@RequestMapping("/cookie")
public class CookieController {@RequestMapping("/tomcatRequest")@ResponseBodypublic String tomcatRequest(HttpServletRequest request) {String yym = request.getParameter("yym");request.getSession().setAttribute("key", yym);return yym;}}
##源码
##请求中没有获取到jsessionid,新建值
##设置到response header
##reponse header写回客户端