@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
HttpSession sess = request.getSession();
User curuser = (User) sess.getAttribute("curuser");
if (request.getParameter("clear") != null) {
ServletContext cont = getServletContext();
Users users = (Users) cont.getAttribute("users");
users.getUsers().put(curuser,new ArrayList<Post>());
cont.setAttribute("users", users);