I am using PrintWriter in one my servlet to flush html like below
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("</head>");
out.println("<body>");
out.println("</body>");
out.println("</html>");
Say now i want to insert one line in html body. Is there a way to insert the data at some specific line at later stage or we have to go sequentially.