@@ -0,0 +1,1195 @@
+package com.mynet.utilities.servlet;%0A%0Aimport javax.servlet.http.Cookie;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Apublic class CommonCookie%0A%7B%0A  public static Cookie get(HttpServletRequest request, String name)%0A  %7B%0A    Cookie%5B%5D cookies = request.getCookies();%0A    Cookie cookie = null;%0A    if (cookies != null) %7B%0A      for (int i = 0; i %3C cookies.length; i++) %7B%0A        if (cookies%5Bi%5D.getName().equals(name))%0A        %7B%0A          try%0A          %7B%0A            cookie = (Cookie)cookies%5Bi%5D.clone();%0A          %7D%0A          catch (NumberFormatException localNumberFormatException) %7B%7D%0A          break;%0A        %7D%0A      %7D%0A    %7D%0A    return cookie;%0A  %7D%0A  %0A  public static Cookie add(HttpServletResponse response, String name, String value, String domain, String path, int age)%0A  %7B%0A    Cookie cookie = new Cookie(name, value);%0A    cookie.setDomain(domain);%0A    cookie.setMaxAge(age);%0A    cookie.setPath(path);%0A    response.addCookie(cookie);%0A    return cookie;%0A  %7D%0A  %0A  public static Cookie add(HttpServletResponse response, String name, String value)%0A  %7B%0A    Cookie cookie = new Cookie(name, value);%0A    response.addCookie(cookie);%0A    return cookie;%0A  %7D%0A%7D%0A

Create CommonCookie.java