⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 __download.java

📁 税务端受理系统java版 增值税网上认证
💻 JAVA
字号:
/* compiled from JSP: /download.jsp
*
* This code was automatically generated at 14:13:58 on 2005-11-23
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*/

package jsp_servlet;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

// User imports


// built-in init parameters:
// boolean             _verbose -- wants debugging

// Well-known variables:
// JspWriter out                  -- to write to the browser
// HttpServletRequest  request    -- the request object.
// HttpServletResponse response   -- the response object.
// PageContext pageContext        -- the page context for this JSP
// HttpSession session            -- the session object for the client (if any)
// ServletContext application     -- The servlet (application) context
// ServletConfig config           -- The ServletConfig for this JSP
// Object page                    -- the instance of this page's implementation class (i.e., 'this')

/**
* This code was automatically generated at 14:13:58 on 2005-11-23
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*
* Copyright (c) 2005 by BEA Systems, Inc. All Rights Reserved.
*/
public final class __download
extends
weblogic.servlet.jsp.JspBase
implements weblogic.servlet.jsp.StaleIndicator
{
    
    // StaleIndicator interface    public boolean _isStale() {        weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext());        java.io.File f = null;        long lastModWhenBuilt = 0L;        if (sci.isResourceStale("/download.jsp", 1122603600921L, "WebLogic Server 7.0  Thu Apr 25 17:16:22 PDT 2002 180709 ")) return true;        return false;    }        public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {        java.io.File f = null;        long lastModWhenBuilt = 0L;        if (sci.isResourceStale("/download.jsp", 1122603600921L, "WebLogic Server 7.0  Thu Apr 25 17:16:22 PDT 2002 180709 ")) return true;        return false;    }            
    
    public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException 
    {  
        
        // declare and set well-known variables:
        javax.servlet.ServletConfig config = getServletConfig();
        javax.servlet.ServletContext application = config.getServletContext();
        javax.servlet.jsp.tagext.Tag _activeTag = null;
        // variables for Tag extension protocol        
        Object page = this;
        javax.servlet.jsp.JspWriter out;
        javax.servlet.jsp.PageContext pageContext =        javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);        
        response.setHeader("Content-Type", "text/html; charset=GBK");        out = pageContext.getOut();        JspWriter _originalOut = out;        
        javax.servlet.http.HttpSession session = request.getSession(true);        
        
        
        try { // error page try block                        response.setContentType("text/html; charset=GBK");                        out.print("\r\n");            //[ /download.jsp; Line: 2]            /////if download //[ /download.jsp; Line: 3]            String downDocuName = new String(request.getParameter( "downLoadUrl" ).getBytes("ISO-8859-1")); //[ /download.jsp; Line: 4]            java.io.File f=new java.io.File(downDocuName); //[ /download.jsp; Line: 5]            if(!f.exists()){ //[ /download.jsp; Line: 6]                //[ /download.jsp; Line: 6]                out.print("\r\n<script language=\"javascript\">\r\n  alert(\"this file no found!\");\r\n  window.history.back();\r\n</script>\r\n");            } //[ /download.jsp; Line: 11]            int i=0; //[ /download.jsp; Line: 12]            int j=0; //[ /download.jsp; Line: 13]            try //[ /download.jsp; Line: 14]            { //[ /download.jsp; Line: 15]                if ( downDocuName != null ){ //[ /download.jsp; Line: 16]                    java.io.FileInputStream fileInputStream =new java.io.FileInputStream(downDocuName); //[ /download.jsp; Line: 17]                    response.setContentType("application/download"); //[ /download.jsp; Line: 18]                    response.setHeader("Content-Disposition","attachment; filename=\"" + downDocuName.substring(downDocuName.lastIndexOf("\\")+1) + "\"");//for window //[ /download.jsp; Line: 19]                    //[ /download.jsp; Line: 20]                    while ((i=fileInputStream.read()) != -1) //[ /download.jsp; Line: 21]                    { //[ /download.jsp; Line: 22]                        out.write(i); //[ /download.jsp; Line: 23]                        j++; //[ /download.jsp; Line: 24]                    } //[ /download.jsp; Line: 25]                    fileInputStream.close(); //[ /download.jsp; Line: 26]                    out.close(); //[ /download.jsp; Line: 27]                }else{ //[ /download.jsp; Line: 28]                    throw new java.io.FileNotFoundException(); //[ /download.jsp; Line: 29]                } //[ /download.jsp; Line: 30]            }catch(java.io.FileNotFoundException e){ //[ /download.jsp; Line: 31]                System.out.println("error in down_doc.jsp:"+e); //[ /download.jsp; Line: 32]            } //[ /download.jsp; Line: 33]            System.out.println("j="+j); //[ /download.jsp; Line: 34]            out.print("\r\n\r\n");        } catch (Throwable __ee) {            while (out != null && out != _originalOut) out = pageContext.popBody();            ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);        }                
        //before final close brace...
    }
    
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -