*
*/
public class CookieUtils {
public static String getCookieValue(Request request, String cookieName) {
HttpRequest httpRequest = (HttpRequest) request;
Cookie[] cookies = httpRequest.getCookies();
if (cookies == null) return null;
for (int i = 0; i < cookies.length; i++) {
String name = cookies[i].getName();
if (name.equals(cookieName)) {
String value = cookies[i].getValue();