public static String queryGetString(HttpRequest req, String key, String def)
	{
		String ret;
		String val = null;
		if(req.method().equals("GET"))
			val = req.queryParam(key);
		else if(req.method().equals("POST"))
			val = req.postParam(key);
		ret = val != null ? val : def;

		return ret;
	}