public class ClientRefresh extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
int count=0;
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
res.setContentType("text/html;charset=euckr");
PrintWriter out = res.getWriter();
res.setHeader("Refresh", "5");
count++;
out.println("<html><head><title>5초마다 Refresh</title></head>");
out.println("<body><center>");
out.println("<h1>5초마다 자동으로 Refresh 됩니다.</h1>");
out.println("count = " + count);
out.println("</center></body></html>");
}
}