Question - Write a simple Servlet program to print the contents of HTML.
Answer -
We can print the contents of HTML using the following steps:
Step 1: Get the object of PrintWriter using request.
1 PrintWriter out = response.getWriter();
Step 2: Now print HTML.
1 out.println("Hello World");