title: what is the use of "response.setContentType("text/html")" in servlet
body: <pre><code>public class HelloWorld extends HttpServlet{ 
        public void doGet(HttpServletRequest request, 
        HttpServletResponse response)
        throws ServletException,IOException{
        **response.setContentType("text/html");**
        PrintWriter pw = response.getWriter();
        pw.println("&lt;html&gt;");
        pw.println("&lt;head&gt;&lt;title&gt;Hello World&lt;/title&gt;&lt;/title&gt;");
        pw.println("&lt;body&gt;");
        pw.println("&lt;h1&gt;Hello World&lt;/h1&gt;");
        pw.println("&lt;/body&gt;&lt;/html&gt;");
        }
      }
  </code></pre>