乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      文件上傳的JSP

       鳳舞天煌 2007-05-24

      <%@ page contentType="text/html; charset=gb2312" import="java.util.*,java.io.*,java.net.*,java.util.regex.*"%>
      <%@ page import="com.evsoft.file.*" %>
      <%@ page import="com.evsoft.db.*" %>
      <%@ page import="com.evsoft.util.*" %>
      <%@ page import="java.sql.*" %>

       

      <html>


      <head>
      <title>數(shù)據(jù)導入</title>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      <LINK href="../../css/style.css" type=text/css rel=stylesheet>
      <SCRIPT language=javascript src="../../js/checkbox.js"  CHARSET="gb2312"></SCRIPT>
      <script>    
      function submitinport()
      {
       
       if ( document.forms[0].filename1.value == "" )
       {
        alert("請輸入數(shù)據(jù)來源文件!");
        return false;
       }
       
       document.getElementById("pwait").style.display = ‘‘;
       return false;
      }


      </script>
      </head>
      <body>
      <table align=‘center‘ border=0 width=‘100%‘ height=‘100%‘ cellPadding=4 cellspacing=1 bgColor=#99ccff>
      <tr>
      <td valign=‘top‘ bgColor=#f0f4f9>

      <%!

       String Upload(HttpServletRequest request) throws Exception
       {
       
        String path = request.getRealPath("/excel_card");
        System.out.println("import path = " + path);
        String msg = "文件上傳失敗";
        
        UploadFile fileBean = new UploadFile();
        
        fileBean.setObjectPath(path);
        fileBean.setSize(10000*1024);
        fileBean.setSuffix(".txt.gif.jpg.png.jpge.html.htm.gz.xls.zip.csv");
        fileBean.setNamingType(fileBean.OLD_NAME);
        fileBean.setSourceFile(request);
       
        String [] saSourceFile = fileBean.getSourceFile();
        String [] saObjectFile = fileBean.getObjectFileName();
        String [] saDescription = fileBean.getDescription();
       
        String FileName   = "";

        int iCount = fileBean.getCount();
        
        String fileName2 = saObjectFile[0];
        String sObjectPath = fileBean.getObjectPath();
        
        //Action = fileBean.getFieldValue("Action");

        FileName = fileName2;
        
        System.out.println("sam_____path_"+path +"/"+FileName);
        return path +"/"+FileName;

       }
      %>


      <%
      String errHtml = "";
      if ( request.getParameter("ss") == null )
      {
       String path =  Upload(request);
        System.out.println("path_sam==="+path);
       
       String templateContent=""; 
       FileInputStream fileinputstream = new FileInputStream(path);//讀取模塊文件
       int lenght = fileinputstream.available();
       byte bytes[] = new byte[lenght];
       fileinputstream.read(bytes);
       fileinputstream.close();
       templateContent = new String(bytes);
       
       //out.println("=================="+templateContent);
       
       String fileame = "outport_sa.xls";
       fileame = request.getRealPath("/")+"/new_report/"+fileame;//生成的outport文件保存路徑
       FileOutputStream fileoutputstream = new FileOutputStream(fileame);//建立文件輸出流
       byte tag_bytes[] = templateContent.getBytes();
       fileoutputstream.write(tag_bytes);
       fileoutputstream.close();
      }

      if ( errHtml.equals("") )
      {
      %>
      <form name="form1" method="POST" enctype="MULTIPART/FORM-DATA" action="aa.jsp">

        <br>  
         <input type=file size=30 class=input name=filename1><br>
         <input type=submit name=inportIT value=" 確  定 " class=button3 onclick="submitinport()">
       
        <br><br><br>
        <div id="pwait" style="display:none">
          正在導入,請稍候...
        </div>

      </form>
      <%
      }
      %>
      </td>
      </tr>
      </table>
      </body>
      </html>

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多