public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException
	{
		try {
			String commandname = request.getParameter("cmd");
			
			Command command = ApplicationController.getInstance().getCommand(commandname);
			command.execute(request);
			
			Gson gson = new Gson();
			response.setContentType("application/json");
			PrintWriter out = response.getWriter();

			if(commandname.equals("getRecommendedAction"))
			{
				String action = (String)request.getAttribute("RecommendedAction");
				out.print(gson.toJson(action));
			}
			
			if(commandname.equals("getHeaterGain"))
			{
				Measurement[] gainValue = (Measurement[])request.getAttribute("HeaterGain");
				out.print(gson.toJson(gainValue));
			}

			if(commandname.equals("getCurrentHeaterGain"))
			{
				Measurement[] gainValue = (Measurement[])request.getAttribute("HeaterGain");
				out.print(gson.toJson(gainValue[0].getValue()));
			}
			
			if(commandname.equals("getCurrentVentilationGain"))
			{
				Measurement[] gainValue = (Measurement[])request.getAttribute("VentilationGain");
				out.print(gson.toJson(gainValue[0].getValue()));
			}

			if(commandname.equals("getVentilationGain"))
			{
				Measurement[] gainValue = (Measurement[])request.getAttribute("VentilationGain");
				out.print(gson.toJson(gainValue));
			}
			
			if(commandname.equals("getThermalComfort"))
			{
				// gets temperature measurements
				Measurement[] initialResults = (Measurement[]) request.getAttribute("Measurement");
				
				initialResults = attachHumanComfort(initialResults);
				initialResults = attachPDD(initialResults);

				out.print(gson.toJson(initialResults));
			}
			
			if(commandname.equals("setVentilationGain"))
			{
				String returnString = (String)request.getAttribute("SetGainStatus");
				
				out.print(gson.toJson(returnString));
			}
			
		} catch (Exception ex) {
		}
	}