package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class HelloWorld2$jsp extends HttpJspBase {

    // begin [file="/HelloWorld2.jsp";from=(3,3);to=(3,26)]
         private int hits = 0; 
    // end

    static {
    }
    public HelloWorld2$jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
    }

    public void _jspService(HttpServletRequest request, HttpServletResponse  response)
        throws java.io.IOException, ServletException {

        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html;charset=ISO-8859-1");
            pageContext = _jspxFactory.getPageContext(this, request, response,
			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // begin [file="/HelloWorld2.jsp";from=(0,2);to=(0,41)]
                 response.addDateHeader("Expires", 0); 
            // end
            // HTML // begin [file="/HelloWorld2.jsp";from=(0,43);to=(3,0)]
                out.write("\r\n<html><head><title>JSP</title></head>\r\n<body><h1>Hello World!</h1>\r\n");

            // end
            // HTML // begin [file="/HelloWorld2.jsp";from=(3,28);to=(4,23)]
                out.write("\r\nYou are visitor number ");

            // end
            // begin [file="/HelloWorld2.jsp";from=(4,25);to=(4,70)]
                 synchronized(this) { out.println(++hits); } 
            // end
            // HTML // begin [file="/HelloWorld2.jsp";from=(4,72);to=(7,28)]
                out.write("\r\nsince the last time the server was restarted.\r\n<p>\r\nThis page was last updated: ");

            // end
            // begin [file="/HelloWorld2.jsp";from=(7,31);to=(7,70)]
                out.print( new java.util.Date().toLocaleString() );
            // end
            // HTML // begin [file="/HelloWorld2.jsp";from=(7,72);to=(8,14)]
                out.write("\r\n</body></html>");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}
