// define strings for the type of the document String docType = ""; String html = "\n"; // get the output stream to send response back to the client PrintWriter output = response.getWriter(); // set the response type to be HTML response.setContentType("text/html"); // write the response document to the user output.println(docType); output.println(html); output.println("
How cool is that?
"); output.println(""); output.println("\n"); // close the connection to the client output.close();