protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		if (dao == null) {
			Map<String, String> env = System.getenv();
			String services = env.get("VCAP_SERVICES");
			ObjectMapper mapper = new ObjectMapper();
			Map svcsMap = mapper.readValue(services, Map.class);
			String locatorip = getCredentialValue(svcsMap, "locatorip");
			int locatorport = Integer.parseInt(getCredentialValue(svcsMap, "port"));
			dao = new GemfireDAO();
			dao.initClient(locatorip, locatorport);
		}
		
		String newPerson = request.getParameter("person");
		String newPost = request.getParameter("post");
		if (newPerson != null && newPerson != "") {
		      Profile profile = new Profile();

		      dao.addPerson(newPerson, profile);
		}
		
		if (newPost != null && newPost != "") {
			int spaceIndex = newPost.indexOf(' ');
			dao.addPost(newPost.substring(0, spaceIndex), newPost.substring(spaceIndex+1));
		}
			
	    Set<String> people = dao.getPeople();
	    Iterator<String> peopleit = people.iterator();
	    String peopleS = "";
	    while (peopleit.hasNext()) {
	    	peopleS = peopleS + peopleit.next() + "<br>";
	    }
	    
	    Set<PostID> posts = dao.getPosts();
	    String postsS = "";
	    Iterator<PostID> postsit = posts.iterator();
	    while (postsit.hasNext()) {
	    	PostID post = postsit.next();
	    	postsS = postsS + post.getAuthor() + ": " + dao.getPost(post) + "<br>";
	    }
	    
	    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/index.jsp");
	    request.setAttribute("people",	peopleS);
	    request.setAttribute("posts", postsS);
	    dispatcher.forward( request, response );
	}