import java.io.*;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import myBean.User;

public class AutoFillServlet extends HttpServlet {

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException
    {
        JspFactory jspFactory = null;
        PageContext pageContext = null;
        JspWriter out = null;
        JspWriter jspWriter = null;


        try {
            jspFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html;charset=GB2312");
            pageContext = jspFactory.getPageContext(this, request, response,
                    null, true, 8192, true);
            out = pageContext.getOut();
            jspWriter = out;

            User usr = new User();
            org.apache.jasper.runtime.JspRuntimeLibrary.introspect(usr, request);
            out.println("Age:"+usr.getAge()+ "<br>Name:"+usr.getName());
        } catch (Throwable t) {
            if (!(t instanceof SkipPageException)){
                out = jspWriter;
                if (out != null && out.getBufferSize() != 0)
                    out.clearBuffer();
                if (pageContext != null) pageContext.handlePageException(t);
            }
        } finally {
            if (jspFactory != null) jspFactory.releasePageContext(pageContext);
        }

    }
}
