* @see javax.servlet.GenericServlet#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
*/
public void service(ServletRequest req, ServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
ServletOutputStream sos = res.getOutputStream();
System.out.println("buffer size is " + res.getBufferSize());
res.setBufferSize(20000);
sos.print("String1<br/>");
sos.print("String2<br/>");
if(res.isCommitted()){
sos.print("Oh well, buffering did not work");
}
else{
sos.print("Buffering is working well");
}
res.reset();
sos.print("Hello world");
}