Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cookies using Jsp

 
Garry Kalra
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i use cookies using JSP
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same as with servlets.
Cookie cookie = new Cookie("mycookie", "myvalue");
// set other cookie params
response.addCookie(cookie);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic