for (User u : users.getUsers().keySet()) {
for (Post p : ((List<Post>) users.getUsers().get(u))) {
if (p.getId() == Integer.parseInt(curpost)) {
Comment c=new Comment();
c.setText(request.getParameter("comment"));
c.setUser(curuser);
p.getComments().add(c);
response.sendRedirect(request.getContextPath() + "/home.jsp");
return;
}