1.获取pageContext
JspFactory jsp1 = JspFactory.getDefaultFactory();
PageContext pageContext = jsp1.getPageContext(this, request, response,
null,true,8192, true);//
//this表示本类servlet对象
//null 是指定错误页面java.lang.String errorPageURL
//true 是否需要session
//8192 缓冲区大小
//true是否缓冲
2.获取ServletConfig
ServletConfig config = this.getServletConfig();
SmartUpload myUpload = new SmartUpload();
myUpload.initialize(config, request, response);
myUpload.upload();