Пример #1
0
 public void init(ServletConfig config)
   throws ServletException
 {
   com.caucho.server.webapp.WebApp webApp
     = (com.caucho.server.webapp.WebApp) config.getServletContext();
   super.init(config);
   com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
   com.caucho.jsp.PageContextImpl pageContext = new com.caucho.jsp.PageContextImpl(webApp, this);
 }
Пример #2
0
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    javax.servlet.http.HttpSession session = request.getSession(true);
    com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext = _jsp_application.getJspApplicationContext().allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);
    javax.servlet.jsp.PageContext _jsp_parentContext = pageContext;
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html;charset=EUC-KR");
    request.setCharacterEncoding("EUC-KR");
    try {
      out.write(_jsp_string0, 0, _jsp_string0.length);
      
	String filename = request.getParameter("filename");
	String downname = request.getParameter("downname");
	FormDataDownload formData = new FormDataDownload(response, new File(filename), null, null);
	try
	{
		formData.download();
	}catch(FileNotFoundException e)
	{
		
      out.write(_jsp_string1, 0, _jsp_string1.length);
      out.print(( e ));
      out.write(_jsp_string2, 0, _jsp_string2.length);
      
		return;
	}catch(IOException e)
	{
		
      out.write(_jsp_string3, 0, _jsp_string3.length);
      out.print(( e ));
      out.write(_jsp_string4, 0, _jsp_string4.length);
      
		return;
	}catch(Exception e)
	{
		System.out.println("Exception Error~~" + e);
	}

      out.write('\n');
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      _jsp_application.getJspApplicationContext().freePageContext(pageContext);
    }
  }
 public void caucho_init(ServletConfig config) {
   try {
     com.caucho.server.webapp.WebApp webApp =
         (com.caucho.server.webapp.WebApp) config.getServletContext();
     init(config);
     if (com.caucho.jsp.JspManager.getCheckInterval() >= 0)
       _caucho_depends.setCheckInterval(com.caucho.jsp.JspManager.getCheckInterval());
     _jsp_pageManager = webApp.getJspApplicationContext().getPageManager();
     com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
     com.caucho.jsp.PageContextImpl pageContext =
         new com.caucho.jsp.InitPageContextImpl(webApp, this);
   } catch (Exception e) {
     throw com.caucho.config.ConfigException.create(e);
   }
 }