protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		CalendarUtility cu = new CalendarUtility();

		// Params
		int weekNum;
		try {
			weekNum = Integer.parseInt(request.getParameter("week"));
		} catch (Exception e) {
			weekNum = cu.getCurrentWeekNum();
		}

		response.setContentType("application/json");
		response.setCharacterEncoding("UTF-8");
		PrintWriter out = response.getWriter();

		// Weeks
		String jsonThisWeek = String.format(jsonThisWeekFmt, weekNum,
				weekNum == cu.getCurrentWeekNum() ? "true" : "false",
				cu.weekToJson(2015, weekNum)); // TODO 2015
		String jsonPrevWeek = String.format(jsonPagerFmt, weekNum == 1 ? 52
				: weekNum - 1, weekNum == 1 ? "true" : "false");
		String jsonNextWeek = String.format(jsonPagerFmt, weekNum + 1,
				weekNum == cu.getCurrentWeekNum() ? "true" : "false");

		// Projects & Data
		String jsonProj = "";
		String jsonData = "";
		try (MySqlDAOFactory factory = new MySqlDAOFactory()) {

			// Projects
			List<Project> projects = factory.getProjectDAO().getProjectsByUser(
					(int) request.getSession().getAttribute("userid"));
			
			for (Project project : projects) // fill in activities lists
				project.setActivities(factory.getActivityDAO().getActivitiesByProject(project.getId()));				
			
			jsonProj = TransferObject.listToJson(projects);

			// Data
			jsonData = TransferObject.listToJson(factory.getDataDAO()
					.getUserData(
							(int) request.getSession().getAttribute("userid"),
							cu.dateToString(cu.getDate(2015, weekNum, 0)),
							cu.dateToString(cu.getDate(2015, weekNum, 6))));

		} catch (Exception e) {
			throw new IOException(e);
		}

		// Writing the response
		String json = String.format(jsonFmt, jsonThisWeek, jsonPrevWeek,
				jsonNextWeek, jsonProj, jsonData);

		out.write(json);
		out.flush();
	}