protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String file;
		String path = System.getenv("OPENSHIFT_DATA_DIR");
	      if (path == null) {
	         file = getServletContext().getRealPath("./post.txt");
	      } else {
	         file = path + "./post.txt";
	      }
		
		PostList postList = new PostList(file);
		
		ArrayList<Post> currentList = postList.getPostList();
		request.setAttribute("postList", currentList);
		
		System.out.println("Post List: " + postList.toString());

		request.getRequestDispatcher("viewposts.jsp").forward(request, response);
	}