This may not be the best way to do this, but in the controller method for the page do this.
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals("poll1")) {
HashMap<String, Object> poll1Votes = poll1DAO.getVotes();
model.addAttribute("poll1Yes", (int) poll1Votes.get("yes"));
model.addAttribute("poll1No", (int) poll1Votes.get("no"));
}
}
}
In the JSP, refer to the variables like this.
<%= poll1Yes %>
Get the variables like this.
int poll1Yes = (Integer) request.getAttribute("poll1Yes");
int poll1No = (Integer) request.getAttribute("poll1No");