Log.log(work)

いろんな作業メモ

Cookieの取り方

めも。

public void add(HttpServletRequest request, 
		HttpServletResponse response, 
		String hoge) {
	Cookie cookie;
	try {
	    cookie = new Cookie("COOKIE_TEST", URLEncoder.encode(hoge, "UTF-8"));
	} catch (UnsupportedEncodingException e) {
	    throw new hogeSystemException(e);
	}
	cookie.setPath(request.getContextPath());
	cookie.setMaxAge(90);
	response.addCookie(cookie);
}