Skip to content

Instantly share code, notes, and snippets.

@hotcoder
hotcoder / gist:8f74d9b7050099cb3c4a
Last active August 29, 2015 14:01
cookie handling
<%
Map<String,String> s = new HashMap<String,String>();
Cookie cookie = null;
Cookie[] cookies = null;
// Get an array of Cookies associated with this domain
cookies = request.getCookies();
if (cookies != null) {
out.println("<h2> Found Cookies Name and Value</h2>");
for (int i = 0; i < cookies.length; i++) {
[
{
"name": "WORLD",
"population": 6916183000
},
{
"name": "More developed regions",
"population": 1240935000
},
{