Code example for PrintWriter

Methods: close, println

0
			System.exit(1);
		} 
		response.setContentType("text/plain");
		response.setStatus(200);
		PrintWriter writer = response.getWriter();
		writer.println("It just needed to be restarted!");
		writer.println("My application metadata: " + System.getenv("VCAP_APPLICATION"));
		writer.println("My port: " + System.getenv("PORT"));
		writer.println("My custom env variable: " + System.getenv("CUSTOM_VAR"));
		writer.close();
	} 
}