Skip to content

Instantly share code, notes, and snippets.

@joegaudet
Created January 16, 2012 22:05
Show Gist options
  • Save joegaudet/1623271 to your computer and use it in GitHub Desktop.
Save joegaudet/1623271 to your computer and use it in GitHub Desktop.
private def setCookie(response: HttpServletResponse, cookieString: String, expiry: Int) = {
val newCookie = new Cookie("MatygoSession", cookieString);
newCookie.setMaxAge(expiry);
newCookie.setPath("/");
newCookie.setMaxAge(expiry)
response.addCookie(newCookie);
cookieString
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment