锘??xml version="1.0" encoding="utf-8" standalone="yes"?>中文字幕亚洲综合久久2,亚洲av纯肉无码精品动漫,国产亚洲精品成人AA片http://m.tkk7.com/coffeecat/category/11289.htmlzh-cnWed, 28 Feb 2007 03:40:17 GMTWed, 28 Feb 2007 03:40:17 GMT60Java 鏂囦歡涓婁紶http://m.tkk7.com/coffeecat/archive/2006/08/18/64384.htmlKevinGongKevinGongFri, 18 Aug 2006 08:29:00 GMThttp://m.tkk7.com/coffeecat/archive/2006/08/18/64384.htmlhttp://m.tkk7.com/coffeecat/comments/64384.htmlhttp://m.tkk7.com/coffeecat/archive/2006/08/18/64384.html#Feedback0http://m.tkk7.com/coffeecat/comments/commentRss/64384.htmlhttp://m.tkk7.com/coffeecat/services/trackbacks/64384.htmljava鏂囦歡涓婁紶,浠嬬粛鍑犵甯哥敤鐨勬柟娉?涔熸槸緇忚繃鏈漢浜叉墜璋冭瘯榪囩殑
1.jspsmartupload
榪欎釜緇勪歡鐢ㄨ搗鏉ユ槸鎸烘柟渚跨殑,涓嶈繃灝辨槸鍙傚悎灝忔枃浠朵笂浼?濡傛灉澶ф枃浠朵笂浼犵殑璇濆氨涓嶈,鏌ョ湅浜嗕竴涓嬩粬鐨勪唬鐮?m_totalBytes = m_request.getContentLength();聽m_binArray = new byte[m_totalBytes];灞呯劧鎶婃暣涓笂浼犳枃浠墮兘璇誨埌鍐呭瓨鍘諱簡,閭e鏋滄槸涓婁紶鍑犲崄M鐨勬枃浠?鍚屾椂鍑犱釜鐢ㄦ埛涓婁紶,鏈嶅姟鍣ㄧǔ鎸?涓嶈繃濡傛灉鍙槸涓婁紶5M浠ュ唴鐨勫皬鏂囦歡,榪欎釜緇勪歡榪樻槸鎸哄疄鐢ㄧ殑

涓嬮潰鏄簮浠g爜:
File綾?br />/*
聽* 鍒涘緩鏃ユ湡 2006-7-29
聽*
聽* 鏇存敼鎵鐢熸垚鏂囦歡妯℃澘涓?br />聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
package com.kinstar.issuing.file;

/**
聽* @author gongyifeng
聽*
聽* 鏇存敼鎵鐢熸垚綾誨瀷娉ㄩ噴鐨勬ā鏉夸負
聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
import java.io.ByteArrayInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.ServletException;

// Referenced classes of package com.jspsmart.upload:
// SmartUploadException, SmartUpload

public class File{
聽private SmartUpload m_parent;
聽private int m_startData;
聽private int m_endData;
聽private int m_size;
聽private String m_fieldname;
聽private String m_filename;
聽private String m_fileExt;
聽private String m_filePathName;
聽private String m_contentType;
聽private String m_contentDisp;
聽private String m_typeMime;
聽private String m_subTypeMime;
聽private String m_contentString;
聽private boolean m_isMissing;
聽public static final int SAVEAS_AUTO = 0;
聽public static final int SAVEAS_VIRTUAL = 1;
聽public static final int SAVEAS_PHYSICAL = 2;

聽File(){
聽聽m_startData = 0;
聽聽m_endData = 0;
聽聽m_size = 0;
聽聽m_fieldname = new String();
聽聽m_filename = new String();
聽聽m_fileExt = new String();
聽聽m_filePathName = new String();
聽聽m_contentType = new String();
聽聽m_contentDisp = new String();
聽聽m_typeMime = new String();
聽聽m_subTypeMime = new String();
聽聽m_contentString = new String();
聽聽m_isMissing = true;
聽}

聽public void saveAs(String s) throws IOException, SmartUploadException{
聽聽saveAs(s, 0);
聽}

聽public void saveAs(String s, int i) throws IOException, SmartUploadException{
聽聽String s1 = new String();
聽聽s1 = m_parent.getPhysicalPath(s, i);
聽聽if(s1 == null)
聽聽聽throw new IllegalArgumentException("There is no specified destination file (1140).");
聽聽try
聽聽{
聽聽聽java.io.File file = new java.io.File(s1);
聽聽聽FileOutputStream fileoutputstream = new FileOutputStream(file);
聽聽聽fileoutputstream.write(m_parent.m_binArray, m_startData, m_size);
聽聽聽fileoutputstream.close();
聽聽}
聽聽catch(IOException ioexception)
聽聽{
聽聽聽throw new SmartUploadException("File can't be saved (1120).");
聽聽}
聽}

聽public void fileToField(ResultSet resultset, String s) throws ServletException, IOException, SmartUploadException, SQLException{
聽聽long l = 0L;
聽聽int i = 0x10000;
聽聽int j = 0;
聽聽int k = m_startData;
聽聽if(resultset == null)
聽聽聽throw new IllegalArgumentException("The RecordSet cannot be null (1145).");
聽聽if(s == null)
聽聽聽throw new IllegalArgumentException("The columnName cannot be null (1150).");
聽聽if(s.length() == 0)
聽聽聽throw new IllegalArgumentException("The columnName cannot be empty (1155).");
聽聽l = BigInteger.valueOf(m_size).divide(BigInteger.valueOf(i)).longValue();
聽聽j = BigInteger.valueOf(m_size).mod(BigInteger.valueOf(i)).intValue();
聽聽try
聽聽{
聽聽聽for(int i1 = 1; (long)i1 < l; i1++)
聽聽聽{
聽聽聽聽resultset.updateBinaryStream(s, new ByteArrayInputStream(m_parent.m_binArray, k, i), i);
聽聽聽聽k = k != 0 ? k : 1;
聽聽聽聽k = i1 * i + m_startData;
聽聽聽}
聽聽聽
聽聽聽if(j > 0)
聽聽聽聽resultset.updateBinaryStream(s, new ByteArrayInputStream(m_parent.m_binArray, k, j), j);
聽聽}catch(SQLException sqlexception){
聽聽聽byte abyte0[] = new byte[m_size];
聽聽聽System.arraycopy(m_parent.m_binArray, m_startData, abyte0, 0, m_size);
聽聽聽resultset.updateBytes(s, abyte0);
聽聽}catch(Exception exception)
聽聽{
聽聽聽throw new SmartUploadException("Unable to save file in the DataBase (1130).");
聽聽}
聽}

聽public boolean isMissing(){
聽聽return m_isMissing;
聽}

聽public String getFieldName(){
聽聽return m_fieldname;
聽}

聽public String getFileName(){
聽聽DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
聽聽String date = df.format(new Date());
聽聽
聽聽return date+m_filename;
聽}

聽public String getFilePathName(){
聽聽return m_filePathName;
聽}

聽public String getFileExt(){
聽聽return m_fileExt;
聽}

聽public String getContentType(){
聽聽return m_contentType;
聽}

聽public String getContentDisp(){
聽聽return m_contentDisp;
聽}

聽public String getContentString(){
聽聽String s = new String(m_parent.m_binArray, m_startData, m_size);
聽聽return s;
聽}

聽public String getTypeMIME() throws IOException{
聽聽return m_typeMime;
聽}

聽public String getSubTypeMIME(){
聽聽return m_subTypeMime;
聽}

聽public int getSize(){
聽聽return m_size;
聽}

聽protected int getStartData(){
聽聽return m_startData;
聽}

聽protected int getEndData(){
聽聽return m_endData;
聽}

聽protected void setParent(SmartUpload smartupload){
聽聽m_parent = smartupload;
聽}

聽protected void setStartData(int i){
聽聽m_startData = i;
聽}

聽protected void setEndData(int i){
聽聽m_endData = i;
聽}

聽protected void setSize(int i){
聽聽m_size = i;
聽}

聽protected void setIsMissing(boolean flag){
聽聽m_isMissing = flag;
聽}

聽protected void setFieldName(String s){
聽聽m_fieldname = s;
聽}

聽protected void setFileName(String s){
聽聽m_filename = s;
聽}

聽protected void setFilePathName(String s){
聽聽m_filePathName = s;
聽}

聽protected void setFileExt(String s){
聽聽m_fileExt = s;
聽}

聽protected void setContentType(String s){
聽聽m_contentType = s;
聽}

聽protected void setContentDisp(String s){
聽聽m_contentDisp = s;
聽}

聽protected void setTypeMIME(String s){
聽聽m_typeMime = s;
聽}

聽protected void setSubTypeMIME(String s){
聽聽m_subTypeMime = s;
聽}

聽public byte getBinaryData(int i){
聽聽if(m_startData + i > m_endData)
聽聽聽throw new ArrayIndexOutOfBoundsException("Index Out of range (1115).");
聽聽if(m_startData + i <= m_endData)
聽聽聽return m_parent.m_binArray[m_startData + i];
聽聽else
聽聽聽return 0;
聽}聽
}

Files綾?br />/*
聽* 鍒涘緩鏃ユ湡 2006-7-29
聽*
聽* 鏇存敼鎵鐢熸垚鏂囦歡妯℃澘涓?br />聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
package com.kinstar.issuing.file;

/**
聽* @author gongyifeng
聽*
聽* 鏇存敼鎵鐢熸垚綾誨瀷娉ㄩ噴鐨勬ā鏉夸負
聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
import java.io.IOException;
import java.util.*;

// Referenced classes of package com.jspsmart.upload:
// File, SmartUpload

public class Files{

聽private SmartUpload m_parent;
聽private Hashtable m_files;
聽private int m_counter;

聽Files(){
聽聽m_files = new Hashtable();
聽聽m_counter = 0;
聽}

聽protected void addFile(File file){
聽聽if(file == null)
聽聽{
聽聽聽throw new IllegalArgumentException("newFile cannot be null.");
聽聽} else聽{
聽聽聽m_files.put(new Integer(m_counter), file);
聽聽聽m_counter++;
聽聽聽return;
聽聽}
聽}

聽public File getFile(int i)
聽{
聽if(i < 0)
聽聽throw new IllegalArgumentException("File's index cannot be a negative value (1210).");
聽File file = (File)m_files.get(new Integer(i));
聽if(file == null)
聽聽throw new IllegalArgumentException("Files' name is invalid or does not exist (1205).");
聽else
聽聽return file;
聽}

聽public int getCount()
聽{
聽聽return m_counter;
聽}

聽public long getSize() throws IOException
聽{
聽聽long l = 0L;
聽聽for(int i = 0; i < m_counter; i++)
聽聽l += getFile(i).getSize();
聽聽
聽聽return l;
聽}

聽public Collection getCollection()
聽{
聽聽return m_files.values();
聽}

聽public Enumeration getEnumeration()
聽{
聽聽return m_files.elements();
聽}
}

Request綾?br />/*
聽* 鍒涘緩鏃ユ湡 2006-7-29
聽*
聽* 鏇存敼鎵鐢熸垚鏂囦歡妯℃澘涓?br />聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
package com.kinstar.issuing.file;

/**
聽* @author gongyifeng
聽*
聽* 鏇存敼鎵鐢熸垚綾誨瀷娉ㄩ噴鐨勬ā鏉夸負
聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
import java.util.Enumeration;
import java.util.Hashtable;

public class Request
{

聽private Hashtable m_parameters;
聽private int m_counter;

聽Request(){
聽聽m_parameters = new Hashtable();
聽聽m_counter = 0;
聽}

聽protected void putParameter(String s, String s1)聽{
聽聽if(s == null)
聽聽聽throw new IllegalArgumentException("The name of an element cannot be null.");
聽聽if(m_parameters.containsKey(s))
聽聽{
聽聽聽Hashtable hashtable = (Hashtable)m_parameters.get(s);
聽聽聽hashtable.put(new Integer(hashtable.size()), s1);
聽聽} else{
聽聽聽Hashtable hashtable1 = new Hashtable();
聽聽聽hashtable1.put(new Integer(0), s1);
聽聽聽m_parameters.put(s, hashtable1);
聽聽聽m_counter++;
聽聽}
聽}

聽public String getParameter(String s){
聽if(s == null)
聽聽throw new IllegalArgumentException("Form's name is invalid or does not exist (1305).");
聽Hashtable hashtable = (Hashtable)m_parameters.get(s);
聽if(hashtable == null)
聽聽return null;
聽else
聽聽return (String)hashtable.get(new Integer(0));
聽}

聽public Enumeration getParameterNames()
聽{
聽聽return m_parameters.keys();
聽}

聽public String[] getParameterValues(String s)
聽{
聽聽if(s == null)
聽聽聽throw new IllegalArgumentException("Form's name is invalid or does not exist (1305).");
聽聽Hashtable hashtable = (Hashtable)m_parameters.get(s);
聽聽if(hashtable == null)
聽聽聽return null;
聽聽String as[] = new String[hashtable.size()];
聽聽for(int i = 0; i < hashtable.size(); i++)
聽聽聽as[i] = (String)hashtable.get(new Integer(i));
聽聽
聽聽return as;
聽}
}

SmartUpload綾?br />/*
聽* 鍒涘緩鏃ユ湡 2006-7-29
聽*
聽* 鏇存敼鎵鐢熸垚鏂囦歡妯℃澘涓?br />聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
package com.kinstar.issuing.file;

/**
聽* @author gongyifeng
聽*
聽* 鏇存敼鎵鐢熸垚綾誨瀷娉ㄩ噴鐨勬ā鏉夸負
聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
import java.io.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;

// Referenced classes of package com.jspsmart.upload:
// Files, Request, SmartUploadException, File

public class SmartUpload
{

聽protected byte m_binArray[];
聽protected HttpServletRequest m_request;
聽protected HttpServletResponse m_response;
聽protected ServletContext m_application;
聽private int m_totalBytes;
聽private int m_currentIndex;
聽private int m_startData;
聽private int m_endData;
聽private String m_boundary;
聽private long m_totalMaxFileSize;
聽private long m_maxFileSize;
聽private Vector m_deniedFilesList;
聽private Vector m_allowedFilesList;
聽private boolean m_denyPhysicalPath;
聽private boolean m_forcePhysicalPath;
聽private String m_contentDisposition;
聽public static final int SAVE_AUTO = 0;
聽public static final int SAVE_VIRTUAL = 1;
聽public static final int SAVE_PHYSICAL = 2;
聽private Files m_files;
聽private Request m_formRequest;

聽public SmartUpload()
聽{
聽聽m_totalBytes = 0;
聽聽m_currentIndex = 0;
聽聽m_startData = 0;
聽聽m_endData = 0;
聽聽m_boundary = new String();
聽聽m_totalMaxFileSize = 0L;
聽聽m_maxFileSize = 0L;
聽聽m_deniedFilesList = new Vector();
聽聽m_allowedFilesList = new Vector();
聽聽m_denyPhysicalPath = false;
聽聽m_forcePhysicalPath = false;
聽聽m_contentDisposition = new String();
聽聽m_files = new Files();
聽聽m_formRequest = new Request();
聽}

聽public final void init(ServletConfig servletconfig) throws ServletException
聽{
聽聽m_application = servletconfig.getServletContext();
聽}

聽public void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)throws ServletException, IOException
聽{
聽聽m_request = httpservletrequest;
聽聽m_response = httpservletresponse;
聽}

聽public final void initialize(ServletConfig servletconfig, HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)throws ServletException
聽{
聽聽m_application = servletconfig.getServletContext();
聽聽m_request = httpservletrequest;
聽聽m_response = httpservletresponse;
聽}

聽public final void initialize(PageContext pagecontext)throws ServletException
聽{
聽聽m_application = pagecontext.getServletContext();
聽聽m_request = (HttpServletRequest)pagecontext.getRequest();
聽聽m_response = (HttpServletResponse)pagecontext.getResponse();
聽}

聽public final void initialize(ServletContext servletcontext, HttpSession httpsession, HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse, JspWriter jspwriter) throws ServletException
聽{
聽聽m_application = servletcontext;
聽聽m_request = httpservletrequest;
聽聽m_response = httpservletresponse;
聽}

聽public void upload()throws ServletException, IOException, SmartUploadException
聽{
聽聽int i = 0;
聽聽boolean flag = false;
聽聽long l = 0L;
聽聽boolean flag1 = false;
聽聽String s = new String();
聽聽String s2 = new String();
聽聽String s4 = new String();
聽聽String s5 = new String();
聽聽String s6 = new String();
聽聽String s7 = new String();
聽聽String s8 = new String();
聽聽String s9 = new String();
聽聽String s10 = new String();
聽聽boolean flag2 = false;
聽聽m_totalBytes = m_request.getContentLength();
聽聽m_binArray = new byte[m_totalBytes];
聽聽int j;
聽聽for(; i < m_totalBytes; i += j)
聽聽try
聽聽{
聽聽聽m_request.getInputStream();
聽聽聽j = m_request.getInputStream().read(m_binArray, i, m_totalBytes - i);
聽聽}
聽聽catch(Exception exception)
聽聽{
聽聽聽throw new SmartUploadException("Unable to upload.");
聽聽}
聽聽
聽聽for(; !flag1 && m_currentIndex < m_totalBytes; m_currentIndex++)
聽聽if(m_binArray[m_currentIndex] == 13)
聽聽聽flag1 = true;
聽聽else
聽聽聽m_boundary = m_boundary + (char)m_binArray[m_currentIndex];
聽聽
聽聽if(m_currentIndex == 1)
聽聽聽return;
聽聽for(m_currentIndex++; m_currentIndex < m_totalBytes; m_currentIndex = m_currentIndex + 2)
聽聽{
聽聽聽String s1 = getDataHeader();
聽聽聽m_currentIndex = m_currentIndex + 2;
聽聽聽boolean flag3 = s1.indexOf("filename") > 0;
聽聽聽String s3 = getDataFieldValue(s1, "name");
聽聽聽if(flag3)
聽聽聽{
聽聽聽聽s6 = getDataFieldValue(s1, "filename");
聽聽聽聽s4 = getFileName(s6);
聽聽聽聽s5 = getFileExt(s4);
聽聽聽聽s7 = getContentType(s1);
聽聽聽聽s8 = getContentDisp(s1);
聽聽聽聽s9 = getTypeMIME(s7);
聽聽聽聽s10 = getSubTypeMIME(s7);
聽聽聽}
聽聽聽getDataSection();
聽聽聽if(flag3 && s4.length() > 0)
聽聽聽{
聽聽聽聽if(m_deniedFilesList.contains(s5))
聽聽聽聽聽throw new SecurityException("The extension of the file is denied to be uploaded (1015).");
聽聽聽聽if(!m_allowedFilesList.isEmpty() && !m_allowedFilesList.contains(s5))
聽聽聽聽聽throw new SecurityException("The extension of the file is not allowed to be uploaded (1010).");
聽聽聽聽if(m_maxFileSize > 0L && (long)((m_endData - m_startData) + 1) > m_maxFileSize)
聽聽聽聽聽throw new SecurityException("Size exceeded for this file : " + s4 + " (1105).");
聽聽聽聽l += (m_endData - m_startData) + 1;
聽聽聽聽if(m_totalMaxFileSize > 0L && l > m_totalMaxFileSize)
聽聽聽聽聽throw new SecurityException("Total File Size exceeded (1110).");
聽聽聽}
聽聽聽if(flag3)
聽聽聽{
聽聽聽聽com.kinstar.issuing.file.File file = new com.kinstar.issuing.file.File();
聽聽聽聽file.setParent(this);
聽聽聽聽file.setFieldName(s3);
聽聽聽聽file.setFileName(s4);
聽聽聽聽file.setFileExt(s5);
聽聽聽聽file.setFilePathName(s6);
聽聽聽聽file.setIsMissing(s6.length() == 0);
聽聽聽聽file.setContentType(s7);
聽聽聽聽file.setContentDisp(s8);
聽聽聽聽file.setTypeMIME(s9);
聽聽聽聽file.setSubTypeMIME(s10);
聽聽聽聽if(s7.indexOf("application/x-macbinary") > 0)
聽聽聽聽聽m_startData = m_startData + 128;
聽聽聽聽聽file.setSize((m_endData - m_startData) + 1);
聽聽聽聽聽file.setStartData(m_startData);
聽聽聽聽聽file.setEndData(m_endData);
聽聽聽聽聽m_files.addFile(file);
聽聽聽聽} else
聽聽聽聽{
聽聽聽聽聽String s11 = new String(m_binArray, m_startData, (m_endData - m_startData) + 1);
聽聽聽聽聽m_formRequest.putParameter(s3, s11);
聽聽聽聽}
聽聽聽聽if((char)m_binArray[m_currentIndex + 1] == '-')
聽聽聽聽聽break;
聽聽聽聽}

聽聽聽}

聽public int save(String s)throws ServletException, IOException, SmartUploadException
聽{
聽聽return save(s, 0);
聽}

聽public int save(String s, int i)throws ServletException, IOException, SmartUploadException
聽{
聽聽int j = 0;
聽聽if(s == null)
聽聽聽s = m_application.getRealPath("/");
聽聽if(s.indexOf("/") != -1)
聽聽{
聽聽聽if(s.charAt(s.length() - 1) != '/')
聽聽聽聽s = s + "/";
聽聽聽} else
聽聽聽if(s.charAt(s.length() - 1) != '\\')
聽聽聽聽s = s + "\\";
聽聽聽for(int k = 0; k < m_files.getCount(); k++)
聽聽聽if(!m_files.getFile(k).isMissing())
聽聽聽{
聽聽聽m_files.getFile(k).saveAs(s + m_files.getFile(k).getFileName(), i);
聽聽聽j++;
聽聽}

聽聽return j;
聽}

聽public int getSize()
聽{
聽聽return m_totalBytes;
聽}

聽public byte getBinaryData(int i)
聽{
聽聽byte byte0;
聽聽try
聽聽{
聽聽聽byte0 = m_binArray[i];
聽聽}
聽聽catch(Exception exception)
聽聽{
聽聽聽throw new ArrayIndexOutOfBoundsException("Index out of range (1005).");
聽聽}
聽聽return byte0;
聽}

聽public Files getFiles()
聽{
聽聽return m_files;
聽}

聽public Request getRequest()
聽{
聽聽return m_formRequest;
聽}

聽public void downloadFile(String s) throws ServletException, IOException, SmartUploadException
聽{
聽聽downloadFile(s, null, null);
聽}

聽public void downloadFile(String s, String s1) throws ServletException, IOException, SmartUploadException, SmartUploadException
聽{
聽聽downloadFile(s, s1, null);
聽}

聽public void downloadFile(String s, String s1, String s2)throws ServletException, IOException, SmartUploadException
聽{
聽聽downloadFile(s, s1, s2, 65000);
聽}

聽public void downloadFile(String s, String s1, String s2, int i)throws ServletException, IOException, SmartUploadException
聽{
聽聽if(s == null)
聽聽聽throw new IllegalArgumentException("File '" + s + "' not found (1040).");
聽聽if(s.equals(""))
聽聽聽throw new IllegalArgumentException("File '" + s + "' not found (1040).");
聽聽if(!isVirtual(s) && m_denyPhysicalPath)
聽聽聽throw new SecurityException("Physical path is denied (1035).");
聽聽if(isVirtual(s))
聽聽聽s = m_application.getRealPath(s);
聽聽java.io.File file = new java.io.File(s);
聽聽FileInputStream fileinputstream = new FileInputStream(file);
聽聽long l = file.length();
聽聽boolean flag = false;
聽聽int k = 0;
聽聽byte abyte0[] = new byte[i];
聽聽if(s1 == null)
聽聽聽m_response.setContentType("application/x-msdownload");
聽聽else
聽聽if(s1.length() == 0)
聽聽聽m_response.setContentType("application/x-msdownload");
聽聽else
聽聽聽m_response.setContentType(s1);
聽聽m_response.setContentLength((int)l);
聽聽m_contentDisposition = m_contentDisposition != null ? m_contentDisposition : "attachment;";
聽聽if(s2 == null)
聽聽聽m_response.setHeader("Content-Disposition", m_contentDisposition + " filename=" + getFileName(s));
聽聽else
聽聽if(s2.length() == 0)
聽聽聽m_response.setHeader("Content-Disposition", m_contentDisposition);
聽聽else
聽聽聽m_response.setHeader("Content-Disposition", m_contentDisposition + " filename=" + s2);
聽聽while((long)k < l)
聽聽{
聽聽聽int j = fileinputstream.read(abyte0, 0, i);
聽聽聽k += j;
聽聽聽m_response.getOutputStream().write(abyte0, 0, j);
聽聽}
聽聽fileinputstream.close();
聽}

聽public void downloadField(ResultSet resultset, String s, String s1, String s2) throws ServletException, IOException, SQLException
聽{
聽if(resultset == null)
聽聽throw new IllegalArgumentException("The RecordSet cannot be null (1045).");
聽if(s == null)
聽聽throw new IllegalArgumentException("The columnName cannot be null (1050).");
聽if(s.length() == 0)
聽聽throw new IllegalArgumentException("The columnName cannot be empty (1055).");
聽byte abyte0[] = resultset.getBytes(s);
聽if(s1 == null)
聽聽m_response.setContentType("application/x-msdownload");
聽else
聽if(s1.length() == 0)
聽聽m_response.setContentType("application/x-msdownload");
聽else
聽聽m_response.setContentType(s1);
聽m_response.setContentLength(abyte0.length);
聽if(s2 == null)
聽聽m_response.setHeader("Content-Disposition", "attachment;");
聽else
聽if(s2.length() == 0)
聽聽m_response.setHeader("Content-Disposition", "attachment;");
聽else
聽聽m_response.setHeader("Content-Disposition", "attachment; filename=" + s2);
聽m_response.getOutputStream().write(abyte0, 0, abyte0.length);
聽}

聽public void fieldToFile(ResultSet resultset, String s, String s1)throws ServletException, IOException, SmartUploadException, SQLException
聽{
聽聽try
聽聽{
聽聽聽if(m_application.getRealPath(s1) != null)
聽聽聽s1 = m_application.getRealPath(s1);
聽聽聽InputStream inputstream = resultset.getBinaryStream(s);
聽聽聽FileOutputStream fileoutputstream = new FileOutputStream(s1);
聽聽聽int i;
聽聽聽while((i = inputstream.read()) != -1)
聽聽聽聽fileoutputstream.write(i);
聽聽聽fileoutputstream.close();
聽聽}
聽聽catch(Exception exception)
聽聽{
聽聽聽throw new SmartUploadException("Unable to save file from the DataBase (1020).");
聽聽}
聽}

聽private String getDataFieldValue(String s, String s1)
聽{
聽聽String s2 = new String();
聽聽String s3 = new String();
聽聽int i = 0;
聽聽boolean flag = false;
聽聽boolean flag1 = false;
聽聽boolean flag2 = false;
聽聽s2 = s1 + "=" + '"';
聽聽i = s.indexOf(s2);
聽聽if(i > 0)
聽聽{
聽聽聽int j = i + s2.length();
聽聽聽int k = j;
聽聽聽s2 = "\"";
聽聽聽int l = s.indexOf(s2, j);
聽聽聽if(k > 0 && l > 0)
聽聽聽s3 = s.substring(k, l);
聽聽}
聽聽return s3;
聽}

聽private String getFileExt(String s)
聽{
聽聽String s1 = new String();
聽聽int i = 0;
聽聽int j = 0;
聽聽if(s == null)
聽聽聽return null;
聽聽i = s.lastIndexOf(46) + 1;
聽聽j = s.length();
聽聽s1 = s.substring(i, j);
聽聽if(s.lastIndexOf(46) > 0)
聽聽聽return s1;
聽聽else
聽聽return "";
聽}

聽private String getContentType(String s)
聽{
聽聽String s1 = new String();
聽聽String s2 = new String();
聽聽int i = 0;
聽聽boolean flag = false;
聽聽s1 = "Content-Type:";
聽聽i = s.indexOf(s1) + s1.length();
聽聽if(i != -1)
聽聽{
聽聽聽int j = s.length();
聽聽聽s2 = s.substring(i, j);
聽聽}
聽聽return s2;
聽}

聽private String getTypeMIME(String s)
聽{
聽聽String s1 = new String();
聽聽int i = 0;
聽聽i = s.indexOf("/");
聽聽if(i != -1)
聽聽聽return s.substring(1, i);
聽聽else
聽聽return s;
聽}

聽private String getSubTypeMIME(String s)
聽{
聽聽String s1 = new String();
聽聽int i = 0;
聽聽boolean flag = false;
聽聽i = s.indexOf("/") + 1;
聽聽if(i != -1)
聽聽{
聽聽聽int j = s.length();
聽聽聽return s.substring(i, j);
聽聽} else
聽聽{
聽聽聽return s;
聽聽}
聽}

聽private String getContentDisp(String s)
聽{
聽聽String s1 = new String();
聽聽int i = 0;
聽聽int j = 0;
聽聽i = s.indexOf(":") + 1;
聽聽j = s.indexOf(";");
聽聽s1 = s.substring(i, j);
聽聽return s1;
聽}

聽private void getDataSection()
聽{
聽聽boolean flag = false;
聽聽String s = new String();
聽聽int i = m_currentIndex;
聽聽int j = 0;
聽聽int k = m_boundary.length();
聽聽m_startData = m_currentIndex;
聽聽m_endData = 0;
聽聽while(i < m_totalBytes)
聽聽if(m_binArray[i] == (byte)m_boundary.charAt(j))
聽聽{
聽聽聽if(j == k - 1)
聽聽聽{
聽聽聽聽m_endData = ((i - k) + 1) - 3;
聽聽聽聽break;
聽聽聽}
聽聽聽i++;
聽聽聽j++;
聽聽} else
聽聽{
聽聽聽i++;
聽聽聽j = 0;
聽聽}
聽聽m_currentIndex = m_endData + k + 3;
聽}

聽private String getDataHeader()
聽{
聽聽int i = m_currentIndex;
聽聽int j = 0;
聽聽boolean flag = false;
聽聽for(boolean flag1 = false; !flag1;)
聽聽if(m_binArray[m_currentIndex] == 13 && m_binArray[m_currentIndex + 2] == 13)
聽聽{
聽聽聽flag1 = true;
聽聽聽j = m_currentIndex - 1;
聽聽聽m_currentIndex = m_currentIndex + 2;
聽聽} else
聽聽{
聽聽聽m_currentIndex++;
聽聽}
聽聽
聽聽String s = new String(m_binArray, i, (j - i) + 1);
聽聽return s;
聽}

聽private String getFileName(String s)
聽{
聽聽String s1 = new String();
聽聽String s2 = new String();
聽聽int i = 0;
聽聽boolean flag = false;
聽聽boolean flag1 = false;
聽聽boolean flag2 = false;
聽聽i = s.lastIndexOf(47);
聽聽if(i != -1)
聽聽聽return s.substring(i + 1, s.length());
聽聽i = s.lastIndexOf(92);
聽聽if(i != -1)
聽聽聽return s.substring(i + 1, s.length());
聽聽else
聽聽return s;
聽}

聽public void setDeniedFilesList(String s) throws ServletException, IOException, SQLException
聽{
聽聽String s1 = "";
聽聽if(s != null)
聽聽{
聽聽String s2 = "";
聽聽for(int i = 0; i < s.length(); i++)
聽聽if(s.charAt(i) == ',')
聽聽{
聽聽聽if(!m_deniedFilesList.contains(s2))
聽聽聽m_deniedFilesList.addElement(s2);
聽聽聽s2 = "";
聽聽} else
聽聽{
聽聽聽s2 = s2 + s.charAt(i);
聽聽}
聽聽
聽聽if(s2 != "")
聽聽聽m_deniedFilesList.addElement(s2);
聽聽} else
聽聽{
聽聽聽m_deniedFilesList = null;
聽聽}
聽}

聽public void setAllowedFilesList(String s)
聽{
聽聽String s1 = "";
聽聽if(s != null)
聽聽{
聽聽聽String s2 = "";
聽聽聽for(int i = 0; i < s.length(); i++)
聽聽聽if(s.charAt(i) == ',')
聽聽聽{
聽聽聽聽if(!m_allowedFilesList.contains(s2))
聽聽聽聽m_allowedFilesList.addElement(s2);
聽聽聽聽s2 = "";
聽聽聽} else
聽聽聽{
聽聽聽聽s2 = s2 + s.charAt(i);
聽聽聽}
聽聽聽
聽聽聽if(s2 != "")
聽聽聽聽m_allowedFilesList.addElement(s2);
聽聽} else
聽聽{
聽聽聽m_allowedFilesList = null;
聽聽}
聽}

聽public void setDenyPhysicalPath(boolean flag)
聽{
聽聽m_denyPhysicalPath = flag;
聽}

聽public void setForcePhysicalPath(boolean flag)
聽{
聽聽m_forcePhysicalPath = flag;
聽}

聽public void setContentDisposition(String s)
聽{
聽聽m_contentDisposition = s;
聽}

聽public void setTotalMaxFileSize(long l)
聽{
聽聽m_totalMaxFileSize = l;
聽}

聽public void setMaxFileSize(long l)
聽{
聽聽m_maxFileSize = l;
聽}

聽protected String getPhysicalPath(String s, int i)throws IOException
聽{
聽聽String s1 = new String();
聽聽String s2 = new String();
聽聽String s3 = new String();
聽聽boolean flag = false;
聽聽s3 = System.getProperty("file.separator");
聽聽if(s == null)
聽聽聽throw new IllegalArgumentException("There is no specified destination file (1140).");
聽聽if(s.equals(""))
聽聽聽throw new IllegalArgumentException("There is no specified destination file (1140).");
聽聽if(s.lastIndexOf("\\") >= 0)
聽聽{
聽聽聽s1 = s.substring(0, s.lastIndexOf("\\"));
聽聽聽s2 = s.substring(s.lastIndexOf("\\") + 1);
聽聽}
聽聽if(s.lastIndexOf("/") >= 0)
聽聽{
聽聽聽s1 = s.substring(0, s.lastIndexOf("/"));
聽聽聽s2 = s.substring(s.lastIndexOf("/") + 1);
聽聽}
聽聽s1 = s1.length() != 0 ? s1 : "/";
聽聽java.io.File file = new java.io.File(s1);
聽聽if(file.exists())
聽聽聽flag = true;
聽聽if(i == 0)
聽聽{
聽聽聽if(isVirtual(s1))
聽聽聽{
聽聽聽聽s1 = m_application.getRealPath(s1);
聽聽聽聽if(s1.endsWith(s3))
聽聽聽聽聽s1 = s1 + s2;
聽聽聽聽else
聽聽聽聽s1 = s1 + s3 + s2;
聽聽聽聽聽return s1;
聽聽聽}
聽聽聽if(flag)
聽聽聽{
聽聽聽聽if(m_denyPhysicalPath)
聽聽聽聽聽throw new IllegalArgumentException("Physical path is denied (1125).");
聽聽聽聽else
聽聽聽聽聽return s;
聽聽聽} else
聽聽聽{
聽聽聽聽throw new IllegalArgumentException("This path does not exist (1135).");
聽聽聽}
聽聽}
聽聽if(i == 1)
聽聽{
聽聽聽if(isVirtual(s1))
聽聽聽{
聽聽聽聽s1 = m_application.getRealPath(s1);
聽聽聽if(s1.endsWith(s3))
聽聽聽聽s1 = s1 + s2;
聽聽聽else
聽聽聽聽s1 = s1 + s3 + s2;
聽聽聽return s1;
聽聽}
聽聽if(flag)
聽聽聽throw new IllegalArgumentException("The path is not a virtual path.");
聽聽else
聽聽聽throw new IllegalArgumentException("This path does not exist (1135).");
聽聽}
聽聽if(i == 2)
聽聽{
聽聽聽if(flag)
聽聽聽if(m_denyPhysicalPath)
聽聽聽聽throw new IllegalArgumentException("Physical path is denied (1125).");
聽聽聽else
聽聽聽聽return s;
聽聽聽if(isVirtual(s1))
聽聽聽聽throw new IllegalArgumentException("The path is not a physical path.");
聽聽聽else
聽聽聽throw new IllegalArgumentException("This path does not exist (1135).");
聽聽} else
聽聽{
聽聽聽return null;
聽聽}
聽}

聽public void uploadInFile(String s)throws IOException, SmartUploadException
聽{
聽聽int i = 0;
聽聽int j = 0;
聽聽boolean flag = false;
聽聽if(s == null)
聽聽聽throw new IllegalArgumentException("There is no specified destination file (1025).");
聽聽if(s.length() == 0)
聽聽聽throw new IllegalArgumentException("There is no specified destination file (1025).");
聽聽if(!isVirtual(s) && m_denyPhysicalPath)
聽聽聽throw new SecurityException("Physical path is denied (1035).");
聽聽i = m_request.getContentLength();
聽聽m_binArray = new byte[i];
聽聽int k;
聽聽for(; j < i; j += k)
聽聽try
聽聽{
聽聽聽k = m_request.getInputStream().read(m_binArray, j, i - j);
聽聽}
聽聽catch(Exception exception)
聽聽{
聽聽聽throw new SmartUploadException("Unable to upload.");
聽聽}
聽聽
聽聽if(isVirtual(s))
聽聽聽s = m_application.getRealPath(s);
聽聽try
聽聽{
聽聽聽java.io.File file = new java.io.File(s);
聽聽聽FileOutputStream fileoutputstream = new FileOutputStream(file);
聽聽聽fileoutputstream.write(m_binArray);
聽聽聽fileoutputstream.close();
聽聽}
聽聽catch(Exception exception1)
聽聽{
聽聽聽throw new SmartUploadException("The Form cannot be saved in the specified file (1030).");
聽聽}
聽}

聽private boolean isVirtual(String s)
聽{
聽聽if(m_application.getRealPath(s) != null)
聽聽{
聽聽聽java.io.File file = new java.io.File(m_application.getRealPath(s));
聽聽聽return file.exists();
聽聽} else
聽聽{
聽聽聽return false;
聽聽}
聽}
}

SmartUploadException 綾?br />/*
聽* 鍒涘緩鏃ユ湡 2006-7-29
聽*
聽* 鏇存敼鎵鐢熸垚鏂囦歡妯℃澘涓?br />聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
package com.kinstar.issuing.file;

/**
聽* @author gongyifeng
聽*
聽* 鏇存敼鎵鐢熸垚綾誨瀷娉ㄩ噴鐨勬ā鏉夸負
聽* 紿楀彛 > 棣栭夐」 > Java > 浠g爜鐢熸垚 > 浠g爜鍜屾敞閲?br />聽*/
public class SmartUploadException extends Exception
{

聽SmartUploadException(String s)
聽{
聽聽super(s);
聽}
}

涓婁紶鐨凷ervlet
package com.kinstar.issuing.action;

import java.io.IOException;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import java.io.*;
import java.sql.SQLException;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;


import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.kinstar.issuing.file.File;
import com.kinstar.issuing.file.SmartUpload;
import com.kinstar.issuing.objects.t_user;
import com.kinstar.issuing.operation.UserOperation;
import com.kinstar.issuing.program.programService;
import com.kinstar.issuing.session.SessionGloble;
import com.kinstar.issuing.util.StringUtil;

/**
聽* @version 聽1.0
聽* @author gyf
聽*/


public class upload2ProgramAction extends HttpServlet{
聽 private ServletConfig config;
聽 /**
聽 * 鍒濆鍖朣ervlet
聽 */
聽 final public void init(ServletConfig config) throws ServletException {
聽聽this.config = config;
聽 }
聽 /**
聽 * 澶勭悊GET璇鋒眰
聽 */
聽 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
聽聽 doPost(request,response);
聽 }

聽 /**
聽 * 鍝嶅簲POST璇鋒眰
聽 */
聽 public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {聽聽
聽聽 int count=0;
聽聽 SmartUpload mySmartUpload = new SmartUpload();
聽聽 try {
聽聽聽聽 // 鍒濆鍖?br />聽聽聽聽 mySmartUpload.initialize(config,request,response);

聽聽聽聽 // 涓婅澆
聽聽聽聽 mySmartUpload.upload();
聽聽聽聽 com.kinstar.issuing.file.File f1 = mySmartUpload.getFiles().getFile(0);
聽聽 //聽 com.kinstar.issuing.file.File f2 = mySmartUpload.getFiles().getFile(1);
聽聽聽聽 String backPic = f1.getFileName();
聽聽 //String name2 = f2.getFileName();
聽聽聽
聽聽聽聽 long size=0;
聽聽聽聽聽
聽聽聽聽// 淇濆瓨涓婅澆鏂囦歡鍒版寚瀹氱洰褰?br />聽聽聽count=mySmartUpload.save("ads");聽聽
聽聽聽response.sendRedirect("program.jsp?dopass=ture");
聽聽
聽聽聽 }聽聽聽聽聽

聽聽聽聽聽
聽聽聽 catch (Exception e){
聽聽聽聽 response.sendRedirect("fail.jsp");
聽聽 }聽
}

2.common-fileupload緇勪歡
鎸哄ソ鐢ㄧ殑,涔熻兘澶熶笂浼犲ぇ鏂囦歡,鎴戣瘯榪?300M浠ヤ笂鐨勬枃浠朵笂浼犳湰鍦頒紶闈炲父蹇?寮傚湴嫻嬭瘯涔熻兘澶熶笂浼犳垚鍔?
棣栧厛瑕佷笅杞給rg.apache.commons.fileupload鍖呭拰org.apache.commons.io鍖?br />
涓嬮潰鏄垜鐨剆ervlet
package com.kinstar.issuing.action;

import java.io.IOException;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import java.io.*;
import java.sql.SQLException;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.regex.*;


import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;

import com.kinstar.issuing.objects.t_user;
import com.kinstar.issuing.operation.UserOperation;
import com.kinstar.issuing.program.programService;
import com.kinstar.issuing.session.SessionGloble;
import com.kinstar.issuing.util.StringUtil;

/**
聽* @version 聽1.0
聽* @author gyf
聽*/


public class uploadProgramAction extends HttpServlet{
聽 private static final String CONTENT_TYPE = "text/html; charset=GB2312";

聽 /**
聽 * 澶勭悊GET璇鋒眰
聽 */
聽 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
聽聽聽 doPost(request,response);
聽 }

聽 /**
聽 * 鍝嶅簲POST璇鋒眰
聽 */
聽 public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
聽聽 // 鍙橀噺瀹氫箟
聽聽聽 response.setContentType(CONTENT_TYPE);
聽聽聽 HttpSession modifysession=request.getSession();
聽聽聽 SessionGloble logonUser;
聽聽聽 logonUser=(SessionGloble)modifysession.getAttribute("UserInfo");
聽聽聽聽聽聽 if(logonUser==null){
聽聽聽聽聽聽 response.sendRedirect("mainindex.jsp");
聽聽聽 }
聽聽聽 t_user userinfo=new t_user();
聽聽聽 UserOperation user=null;
聽聽聽 try {
聽聽聽聽 user = new UserOperation();
聽聽聽 } catch (Exception e1) {
聽聽聽 // TODO 鑷姩鐢熸垚 catch 鍧?br />聽聽聽 e1.printStackTrace();
聽聽聽 }
聽聽聽 try {
聽聽聽聽 userinfo=user.getUser(logonUser.getUserId());
聽聽聽 } catch (Exception e2) {
聽聽聽 // TODO 鑷姩鐢熸垚 catch 鍧?br />聽聽聽 e2.printStackTrace();
聽聽聽 }
聽聽聽聽 //System.out.println("figure="+userinfo.getUserFigure());
聽聽聽聽 PrintWriter out=response.getWriter();
聽聽聽聽 DateFormat updf = new SimpleDateFormat("yyyyMMddHHmm");
聽聽聽聽 String updateTime = updf.format(new Date());
聽聽聽聽 int isNeed = 0;
聽聽聽聽 String IsCheck="0";
聽聽
聽聽聽 //鐪佸啘琛岀敤鎴蜂笂浼犵殑鑺傜洰蹇呴渶鏄劇ず錛屼笖瀹℃壒宸茬粡鍚堟牸
聽聽聽聽 if(userinfo.getUserFigure().equals("1")){
聽聽聽聽 isNeed = 1;
聽聽聽聽 IsCheck = "1";
聽聽聽聽 }
聽聽聽聽 else{
聽聽聽聽 isNeed = 0;
聽聽聽聽 IsCheck = "0";
聽聽聽聽 }
聽聽聽 int type=0;
聽聽聽 String avaTime="";
聽聽聽 String screen="";
聽聽聽 int fileTime=0;
聽聽聽 int fileTimeReal=0;
聽聽聽 int circle=0;
聽聽聽 String picSwitch="";
聽聽聽 String deleState="1";
聽聽聽 String backPic="";
聽聽聽
聽聽聽 String fieldName="";
聽聽聽 String finalName="";
聽聽聽 String fileNameReal="";
聽聽聽 long size=0;
聽聽聽 String name="";
聽聽聽聽 try {
聽聽聽聽DiskFileUpload fu = new DiskFileUpload();
聽聽聽聽// 璁劇疆鍏佽鐢ㄦ埛涓婁紶鏂囦歡澶у皬,鍗曚綅:瀛楄妭錛岃繖閲岃涓?m
聽聽聽聽fu.setSizeMax(5*1024*1024*1024);
聽聽聽聽// 璁劇疆鏈澶氬彧鍏佽鍦ㄥ唴瀛樹腑瀛樺偍鐨勬暟鎹?鍗曚綅:瀛楄妭
聽聽聽聽fu.setSizeThreshold(10*1024*1024);
聽聽聽聽// 璁劇疆涓鏃︽枃浠跺ぇ灝忚秴榪噂etSizeThreshold()鐨勫兼椂鏁版嵁瀛樻斁鍦ㄧ‖鐩樼殑鐩綍
聽聽聽聽fu.setRepositoryPath("C:\\WINDOWS\\Temp\\");
聽聽聽聽//寮濮嬭鍙栦笂浼犱俊鎭?br />聽聽聽聽List fileItems = fu.parseRequest(request);
聽聽聽聽//渚濇澶勭悊姣忎釜涓婁紶鐨勬枃浠?br />聽聽聽聽Iterator iter = fileItems.iterator();

聽聽
聽聽聽聽聽聽 //姝e垯鍖歸厤錛岃繃婊よ礬寰勫彇鏂囦歡鍚?br />聽聽聽聽String regExp=".+\\\\(.+)$";

聽聽聽聽//榪囨護鎺夌殑鏂囦歡綾誨瀷
聽聽聽聽String[] errorType={".exe",".com",".cgi",".asp"};
聽聽聽聽聽
聽聽聽聽Pattern p = Pattern.compile(regExp);
聽聽聽聽StringUtil su = new StringUtil();
聽聽聽聽 聽
聽聽聽聽while (iter.hasNext()) {
聽聽聽聽聽 FileItem item = (FileItem)iter.next();
聽聽聽聽
聽聽聽聽聽聽 if(item.isFormField()) {
聽聽聽聽聽聽 // 鑾峰緱琛ㄥ崟鍩熺殑鍚嶅瓧
聽聽聽聽聽聽聽 fieldName = item.getFieldName();
聽聽聽聽聽聽聽 // 濡傛灉琛ㄥ崟鍩熺殑鍚嶅瓧鏄痭ame鈥?
聽聽聽聽聽聽聽 if(fieldName.equals("type"))
聽聽聽聽聽聽聽 聽聽聽 type = Integer.parseInt(item.getString());
聽聽聽聽聽聽
聽聽聽聽聽聽 }
聽聽聽聽聽 if (!item.isFormField()) {
聽聽聽聽聽聽 name = item.getName();
聽聽聽聽聽聽 size = item.getSize();
聽聽聽聽聽聽 if((name==null||name.equals("")) && size==0)
聽聽聽聽聽聽聽 continue;
聽聽聽聽聽聽聽 Matcher m = p.matcher(name);
聽聽聽聽聽聽聽 boolean result = m.find();
聽聽聽聽聽聽聽 if (result){
聽聽聽聽聽聽聽 for (int temp=0;temp<errorType.length;temp++){
聽聽聽聽聽聽聽 if (m.group(1).endsWith(errorType[temp])){
聽聽聽聽聽聽聽聽throw new IOException(name+": wrong type");
聽聽聽聽聽聽聽 }
聽聽聽聽聽聽聽 }
聽聽聽聽聽聽
聽聽聽聽聽聽 DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 String date = df.format(new Date());
聽聽聽聽聽聽 fileNameReal=date+m.group(1);
聽聽聽聽聽聽 finalName=date+Math.round(Math.random()*10000)+fileNameReal.substring(fileNameReal.indexOf("."));
聽聽聽聽聽聽聽 //淇濆瓨涓婁紶鐨勬枃浠跺埌鎸囧畾鐨勭洰褰暵犅?br />聽聽聽聽聽聽聽 //鍦ㄤ笅鏂囦腑涓婁紶鏂囦歡鑷蟲暟鎹簱鏃訛紝灝嗗榪欓噷鏀瑰啓
聽聽聽聽聽聽聽 item.write(new File(getServletContext().getRealPath(".//ads//")+finalName));
聽聽聽聽聽聽聽 //out.print(finalName+size);
聽聽聽聽聽聽聽 }
聽聽聽聽聽聽 else
聽聽聽聽聽聽 {
聽聽聽聽聽聽throw new IOException("fail to upload");
聽聽聽聽聽聽
聽聽聽聽聽聽 }聽
聽聽聽聽聽 }
聽聽聽聽聽 if(item.isFormField()) {
聽聽聽聽聽// 鑾峰緱琛ㄥ崟鍩熺殑鍚嶅瓧
聽聽聽聽聽fieldName = item.getFieldName();
聽聽聽聽聽if(fieldName.equals("avaTime"))
聽聽聽聽聽聽avaTime=item.getString();
聽聽聽聽聽if(fieldName.equals("screen"))
聽聽聽聽聽聽screen=item.getString();
聽聽聽聽聽if(fieldName.equals("fileTime"))
聽聽聽聽聽聽fileTime = Integer.parseInt(item.getString());
聽聽聽聽聽if(fieldName.equals("fileTimeReal"))
聽聽聽聽聽聽fileTimeReal = Integer.parseInt(item.getString());
聽聽聽聽聽if(fieldName.equals("circle"))
聽聽聽聽聽聽circle = Integer.parseInt(item.getString());聽
聽聽聽聽聽if(fieldName.equals("switchPic"))
聽聽聽聽聽聽聽 picSwitch = item.getString();聽
聽聽聽聽聽聽
聽聽聽聽聽 }聽聽聽
聽聽聽聽聽聽 }
聽聽聽聽 }catch (IOException e){
聽聽聽聽 聽聽out.println(e);
聽聽聽聽 }catch (FileUploadException e){
聽聽聽聽 聽聽out.println(e);
聽聽聽聽 } catch (Exception e) {
聽聽聽聽// TODO 鑷姩鐢熸垚 catch 鍧?br />聽聽聽聽聽e.printStackTrace();
聽聽聽聽 }
聽聽聽聽 if(finalName.equals("")){
聽聽聽聽 聽聽response.sendRedirect("fail.jsp");
聽聽聽聽 }
聽聽聽聽 else{
聽聽聽try {
聽聽聽聽programService ps = new programService();
聽聽聽聽ps.insertProgram(userinfo.getUserId(),updateTime,type,finalName,size,isNeed,avaTime,deleState,IsCheck,userinfo.getCity(),backPic,screen,fileTime,fileTimeReal,picSwitch,circle,userinfo.getUserFigure(),new String(fileNameReal.getBytes("GB2312"),"ISO8859-1"));
聽聽聽聽response.sendRedirect("program.jsp?dopass=true");聽
聽聽聽} catch (Exception e3) {
聽聽聽// TODO 鑷姩鐢熸垚 catch 鍧?br />聽聽聽聽e3.printStackTrace();
聽聽聽}
聽聽聽聽 }
聽聽聽}
}



KevinGong 2006-08-18 16:29 鍙戣〃璇勮
]]>
濡備綍鍦╓eb宸ョ▼涓疄鐜頒換鍔¤鍒掕皟搴?/title><link>http://m.tkk7.com/coffeecat/archive/2006/08/06/62082.html</link><dc:creator>KevinGong</dc:creator><author>KevinGong</author><pubDate>Sun, 06 Aug 2006 13:48:00 GMT</pubDate><guid>http://m.tkk7.com/coffeecat/archive/2006/08/06/62082.html</guid><wfw:comment>http://m.tkk7.com/coffeecat/comments/62082.html</wfw:comment><comments>http://m.tkk7.com/coffeecat/archive/2006/08/06/62082.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/coffeecat/comments/commentRss/62082.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/coffeecat/services/trackbacks/62082.html</trackback:ping><description><![CDATA[ <p>鏈榪戝仛涓涓猚ts錛屽叾涓湁涓涓畾鏃舵姤璀︾殑闇姹傦紝緗戜笂鎵句簡鐐硅祫鏂欏弬鑰冿紒<br /></p> <div id="lfvnvjd" class="ContentFont" id="NewaspContentLabel" style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"> <font id="font_word" style="FONT-SIZE: 14px; FONT-FAMILY: 瀹嬩綋, Verdana, Arial, Helvetica, sans-serif"> <p> <font face="妤蜂綋_GB2312" size="5">濡備綍鍦╓eb宸ョ▼涓疄鐜頒換鍔¤鍒掕皟搴?/font> </p> <p> <font face="Verdana">聽聽聽聽 濂藉鏈嬪弸鐢ㄨ繃Windows鐨勪換鍔¤鍒掞紝涔熸湁涓嶅皯紼嬪簭榪瘋嚜宸辨浘鍐欒繃鏃墮挓鎶ヨ銆佺郴緇熻嚜鍔ㄥ叧鏈虹瓑瓚e懗紼嬪簭錛屽彲鍗村緢灝戞湁鏈嬪弸鍦╓eb宸ョ▼涓疄鐜拌繃綾諱技鍔熻兘銆備粖澶╂湁絀烘妸絎旇呭厛鍓嶆浘鍦═omcat涓婂疄鐜扮殑綾諱技鍔熻兘錛屾惉鍑烘潵涓庡ぇ瀹跺叡浜?br />聽聽聽 聽鏃╁湪鍑犲勾鍓嶏紝鎴戝叕鍙歌窡鏌愬競璐㈡斂灞鍚堜綔欏圭洰寮鍙戯紝涓哄姞寮鴻儲鏀垮眬瀵規墍灞炲崟浣嶈儲鍔$姸鍐電殑鏈夋晥鐩戠錛屽紑鍙戙佸疄鏂戒簡璐㈡斂灞鏁版嵁涓績欏圭洰銆傛欏圭洰閲囩敤B/S鍔燙/S娣峰悎緇撴瀯妯″紡銆傝儲鏀垮眬Web鏈嶅姟鍣ㄤ笂鏋惰鏁版嵁鍚屾鎺ユ敹瑁呯疆錛岀敱甯傚睘鍗曚綅姣忓ぉ涓嬬彮鍓嶆妸璐㈠姟淇℃伅閫氳繃HTTP鍗忚涓婁紶鑷寵儲鏀垮眬涓績鏈嶅姟鍣紝涓嶹eb鏈嶅姟鍣ㄤ笂鐨勬帴鏀惰緗鎺ャ傝儲鏀垮眬鍐呴儴鍚勯儴闂ㄩ渶瑕佹煡闃呭ぇ閲忚儲鍔′俊鎭紝鑾峰彇瀹屽鐨勫競灞炲崟浣嶅綋鍓嶈儲鍔$姸鍐典俊鎭紝鍚勯儴闂ㄦ寜鑱岃兘鍒掑垎錛岄渶瑕佸噯紜殑鑾峰彇鍚勯儴闂ㄥ悇鑷墍鍏蟲敞鐨勬眹鎬諱俊鎭紝浠ヨ儲鏀挎姤琛ㄧ殑褰㈠紡鎻愪緵銆?<br />聽聽聽 鍥犺儲鏀挎暟鎹噺澶э紝瀹炴椂璁$畻璐㈡斂鎶ヨ〃閫熷害杈冩參錛屽綋鍒濆氨鑰冭檻鐢ㄦ姤琛ㄧ紦瀛樻潵鍑忚交鏈嶅姟鍣ㄧ殑璐熸媴錛屼絾鐢ㄧ紦瀛橀渶瑕佷竴涓悎鐞嗙殑緙撳瓨鏇存柊鏈哄埗銆傝冭檻鍒板悇甯傚睘鍗曚綅姣忓ぉ涓嬬彮鍓嶆墠鎶婅儲鍔℃暟鎹笂浼狅紝璐㈡斂灞姣忓ぉ鎵鏌ョ湅鍒扮殑璐㈠姟淇℃伅鍏跺疄騫朵笉鍖呮嫭褰撳ぉ錛堥櫎闈炴湁鏌愪綅棰嗗絳夊埌鎵灞炲崟浣嶅叏閮ㄤ笂浼犲畬涔嬪悗鎵嶆潵鏌ョ湅淇℃伅錛屽簲璇ュ凡緇忎笅鐝簡錛夛紝鎵浠ヨ鏄兘瀹炵幇浠誨姟璁″垝璋冨害錛屽湪姣忔櫄娣卞鎶婂綋澶╁強鍘嗗彶璐㈠姟淇℃伅姹囨伙紝鏇存柊緙撳瓨錛岄熷害鐡墮涓嶅氨瑙e喅浜嗗悧銆?br />聽聽聽 褰撴椂鐢變簬緋葷粺鏍稿績鏄熀浜嶹eb閮ㄧ講鐨勶紝鎶ヨ〃璁$畻寮曟搸涔熺浉搴旂殑閮ㄧ講鍦═omcat瀹瑰櫒涓婏紝鍥犳濡傛灉鎯寵鍊熺敤Windows鐨勪換鍔¤鍒掓潵瀹炵幇瀹氭椂璁$畻錛屽氨闇瑕侀澶栫紪鍐欐櫘閫氭闈㈠簲鐢ㄧ▼搴忔帴鍙o紝紼嶆樉澶嶆潅銆備簬鏄氨鐞㈢(鐫鎯沖湪Web涓婂疄鐜幫紝緇忚繃鏌ラ槄杈冨鐩稿叧璧勬枡錛屽彂鐜癑ava瀹氭椂鍣紙java.util.Timer錛夋湁瀹氭椂瑙﹀彂璁″垝浠誨姟鐨勫姛鑳斤紝閫氳繃閰嶇疆瀹氭椂鍣ㄧ殑闂撮殧鏃墮棿錛屽湪鏌愪竴闂撮殧鏃墮棿孌典箣鍚庝細鑷姩鏈夎寰嬬殑璋冪敤棰勫厛鎵瀹夋帓鐨勮鍒掍換鍔★紙java.util.TimerTask錛夈傚彟澶栵紝鐢變簬鎴戜滑甯屾湜褰揥eb宸ョ▼鍚姩鏃訛紝瀹氭椂鍣ㄨ兘鑷姩寮濮嬭鏃訛紝鍦ㄦ暣涓猈eb宸ョ▼鐨勭敓鍛芥湡閲岋紝瀹氭椂鍣ㄨ兘鍦ㄦ瘡鏅氭繁澶滆Е鍙戜竴嬈℃姤琛ㄨ綆楀紩鎿庛傚洜姝ゅ畾鏃跺櫒鐨勫瓨鏀句綅緗篃鍊煎緱鑰冩煡錛屼笉鑳界畝鍗曠殑瀛樺湪浜庡崟涓猄ervlet鎴朖avaBean涓紝蹇呴』鑳借瀹氭椂鍣ㄥ涓葷殑瀛樻椿鏈熶負鏁翠釜Web宸ョ▼鐢熷懡鏈燂紝鍦ㄥ伐紼嬪惎鍔ㄦ椂鑳借嚜鍔ㄥ姞杞借繍琛屻傜粨鍚堣繖涓ょ偣錛岃窡Servlet涓婁笅鏂囨湁鍏崇殑渚﹀惉鍣ㄥ氨鏈鍚堥備笉榪囦簡錛岄氳繃鍦ㄥ伐紼嬬殑閰嶇疆鏂囦歡涓姞浠ュ悎鐞嗛厤緗紝浼氬湪宸ョ▼鍚姩鏃惰嚜鍔ㄨ繍琛岋紝騫跺湪鏁翠釜宸ョ▼鐢熷懡鏈熶腑澶勪簬鐩戝惉鐘舵併?br />聽聽聽 涓嬮潰灝盨ervlet渚﹀惉鍣ㄧ粨鍚圝ava瀹氭椂鍣ㄦ潵璁茶堪鏁翠釜瀹炵幇榪囩▼銆傝榪愮敤Servlet渚﹀惉鍣ㄩ渶瑕佸疄鐜癹avax.servlet.ServletContextListener鎺ュ彛錛屽悓鏃跺疄鐜板畠鐨刢ontextInitialized(ServletContextEvent event)鍜宑ontextDestroyed(ServletContextEvent event)涓や釜鎺ュ彛鍑芥暟銆傝冭檻瀹氭椂鍣ㄦ湁涓緩绔嬪拰閿姣佺殑榪囩▼錛岀湅浜嗗墠闈袱涓帴鍙e嚱鏁幫紝灝變笉瀹圭疆鐤戠殑鎶婂緩绔嬬殑榪囩▼緗叆contextInitialized錛屾妸閿姣佺殑榪囩▼緗叆contextDestroyed浜嗐?br />聽聽聽 鎴戞妸ServletContextListener鐨勫疄鐜扮被鍙栧悕涓篊ontextListener,鍦ㄥ叾鍐呮坊鍔犱竴涓畾鏃跺櫒錛岀ず渚嬩唬鐮佸涓嬫墍紺猴紙涓鴻冭檻綃囧箙錛屼粎鎻愪緵閮ㄥ垎浠g爜渚涜鑰呭弬鑰冿級錛?/font> </p> <font face="Verdana"> <p> <br />聽聽聽 private java.util.Timer timer = null; <br />聽聽聽 public void contextInitialized(ServletContextEvent event) { <br />聽聽聽聽聽聽聽 timer = new java.util.Timer(true); <br />聽聽聽聽聽聽聽 event.getServletContext().log("瀹氭椂鍣ㄥ凡鍚姩");聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽聽 timer.schedule(new MyTask(event.getServletContext()), 0, 60*60*1000); <br />聽聽聽聽聽聽聽 event.getServletContext().log("宸茬粡娣誨姞浠誨姟璋冨害琛?); <br />聽聽聽 } <br />聽聽聽 public void contextDestroyed(ServletContextEvent event) { <br />聽聽聽聽聽聽聽 timer.cancel(); <br />聽聽聽聽聽聽聽 event.getServletContext().log("瀹氭椂鍣ㄩ攢姣?); <br />聽聽聽 } </p> <p>聽聽聽 浠ヤ笂浠g爜涓? timer.schedule(new MyTask(event.getServletContext()), 0, 60*60*1000)榪欎竴琛屼負瀹氭椂鍣ㄨ皟搴﹁鍙ワ紝鍏朵腑MyTask鏄嚜瀹氫箟闇瑕佽璋冨害鐨勬墽琛屼換鍔★紙鍦ㄦ垜鐨勮儲鏀挎暟鎹腑蹇冮」鐩腑灝辨槸鎶ヨ〃璁$畻寮曟搸鍏ュ彛錛夛紝浠巎ava.util.TimerTask緇ф壙錛屼笅闈細閲嶇偣璁茶堪錛岀涓変釜鍙傛暟琛ㄧず姣忓皬鏃?鍗?0*60*1000姣)琚Е鍙戜竴嬈★紝涓棿鍙傛暟0琛ㄧず鏃犲歡榪熴傚叾瀹冧唬鐮佺浉褰撶畝鍗曪紝涓嶅啀璇︾粏璇存槑銆?br />聽聽 涓嬮潰浠嬬粛MyTask鐨勫疄鐜幫紝涓婇潰鐨勪唬鐮佷腑鐪嬪埌浜嗗湪鏋勯燤yTask鏃訛紝浼犲叆浜唈avax.servlet.ServletContext綾誨瀷鍙傛暟,鏄負璁板綍Servlet鏃ュ織鏂逛究鑰屼紶鍏ワ紝鍥犳闇瑕侀噸杞組yTask鐨勬瀯閫犲嚱鏁幫紙鍏剁埗綾籮ava.util.TimerTask鍘熸瀯閫犲嚱鏁版槸娌℃湁鍙傛暟鐨勶級銆傚湪timer.schedule()鐨勮皟搴︿腑,璁劇疆浜嗘瘡灝忔椂璋冨害涓嬈?鍥犳濡傛灉鎯沖疄鐜拌皟搴︿換鍔℃瘡24灝忔椂琚墽琛屼竴嬈★紝榪橀渶瑕佸垽鏂竴涓嬫椂閽熺偣錛屼互甯擱噺C_SCHEDULE_HOUR琛ㄧず(鏅氫笂12鐐癸紝涔熷嵆0鐐?銆傚悓鏃朵負闃叉24灝忔椂鎵ц涓嬫潵錛屼換鍔¤繕鏈墽琛屽畬錛堝綋鐒訛紝涓鑸換鍔℃槸娌℃湁榪欎箞闀跨殑錛夛紝閬垮厤絎簩嬈″張琚皟搴︿互寮曡搗鎵ц鍐茬獊錛岃緗簡褰撳墠鏄惁姝e湪鎵ц鐨勭姸鎬佹爣蹇梚sRunning銆傜ず渚嬩唬鐮佸涓嬫墍紺猴細</p> <p> <br />聽聽聽 private static final int C_SCHEDULE_HOUR聽聽 = 0; <br />聽聽聽 private static boolean isRunning = false; <br />聽聽聽聽聽聽聽聽 private ServletContext context = null; <br />聽聽聽 public MyTask(ServletContext context) { <br />聽聽聽聽聽聽聽 this.context = context; <br />聽聽聽 } <br />聽聽聽 public void run() { <br />聽聽聽聽聽聽聽 Calendar cal = Calendar.getInstance();聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽 if (!isRunning)聽 {聽聽聽聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽聽聽聽聽 if (C_SCHEDULE_HOUR == cal.get(Calendar.HOUR_OF_DAY)) {聽聽聽聽聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 isRunning = true;聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 context.log("寮濮嬫墽琛屾寚瀹氫換鍔?); <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 //TODO 娣誨姞鑷畾涔夌殑璇︾粏浠誨姟錛屼互涓嬪彧鏄ず渚?<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 int i = 0; <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 while (i++ < 10) { <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 context.log("宸插畬鎴愪換鍔$殑" + i + "/" + 10); <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 } </p> <p>聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 isRunning = false; <br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 context.log("鎸囧畾浠誨姟鎵ц緇撴潫");聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽聽聽聽聽 }聽聽聽聽聽聽聽聽聽聽聽聽 <br />聽聽聽聽聽聽聽 } else { <br />聽聽聽聽聽聽聽聽聽聽聽 context.log("涓婁竴嬈′換鍔℃墽琛岃繕鏈粨鏉?); <br />聽聽聽聽聽聽聽 } <br />聽聽聽 } </p> <p>聽聽聽 涓婇潰浠g爜涓?/TODO鈥︹︹濅箣涓嬪洓琛屾槸鐪熸琚皟搴︽墽琛岀殑婕旂ず浠g爜(鍦ㄦ垜鐨勮儲鏀挎暟鎹腑蹇冮」鐩腑灝辨槸鎶ヨ〃璁$畻榪囩▼)錛屾偍鍙互鎹㈡垚鑷繁甯屾湜鎵ц鐨勮鍙ャ?br />鍒拌繖鍎匡紝ServletContextListener鍜孧yTask鐨勪唬鐮侀兘宸插畬鏁翠簡銆傛渶鍚庝竴姝ュ氨鏄妸ServletContextListener閮ㄧ講鍒版偍鐨刉eb宸ョ▼涓幓錛屽湪鎮ㄥ伐紼嬬殑web.xml閰嶇疆鏂囦歡涓姞鍏ュ涓嬩笁琛岋細<br />聽聽聽 <br />聽聽聽聽聽聽聽 com.test.ContextListener<br />聽聽聽聽 <br />聽聽聽 褰撶劧錛屼笂闈㈢殑com.test寰楁崲鎴愭偍鑷繁鐨勫寘鍚嶄簡銆備繚瀛榳eb.xml鏂囦歡鍚庯紝鎶婂伐紼嬫墦鍖呴儴緗插埌Tomcat涓嵆鍙備換鍔′細鍦ㄦ瘡鏅?2鐐硅嚦鍑屾櫒1鐐逛箣闂磋鎵ц錛屼笂闈㈢殑浠g爜浼氬湪Tomcat鐨勬棩蹇楁枃浠朵腑璁板綍濡備笅錛?br />2003-12-05 0錛?1錛?9 寮濮嬫墽琛屾寚瀹氫換鍔?br />2003-12-05 0錛?1錛?9 宸插畬鎴愪換鍔$殑1/10<br />聽聽聽 鈥︹?br />2003-12-05 0錛?1錛?9 宸插畬鎴愪換鍔$殑10/10<br />2003-12-05 0錛?1錛?9 鎸囧畾浠誨姟鎵ц緇撴潫<br /></p> </font> </font> </div> <img src ="http://m.tkk7.com/coffeecat/aggbug/62082.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/coffeecat/" target="_blank">KevinGong</a> 2006-08-06 21:48 <a href="http://m.tkk7.com/coffeecat/archive/2006/08/06/62082.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://wangquanai.com" target="_blank">免费在线观看理论片</a>| <a href="http://cfxzp.com" target="_blank">免费h片在线观看网址最新</a>| <a href="http://ymiwang.com" target="_blank">国产精品免费_区二区三区观看</a>| <a href="http://xiaoduanfa.com" target="_blank">亚洲综合一区二区精品导航</a>| <a href="http://18jko.com" target="_blank">久久免费公开视频</a>| <a href="http://sanyoumiaomu.com" target="_blank">亚洲综合婷婷久久</a>| <a href="http://saohuo7.com" target="_blank">无遮免费网站在线入口</a>| <a href="http://zgnyxx.com" target="_blank">四虎亚洲精品高清在线观看</a>| <a href="http://qq2071.com" target="_blank">啦啦啦手机完整免费高清观看</a>| <a href="http://cc58866.com" target="_blank">亚洲精品美女久久久久久久</a>| <a href="http://ninidian.com" target="_blank">四虎永久在线精品视频免费观看</a>| <a href="http://www04ggg.com" target="_blank">亚洲av无码成人精品国产</a>| <a href="http://857434.com" target="_blank">四虎免费久久影院</a>| <a href="http://470577.com" target="_blank">一级成人生活片免费看</a>| <a href="http://zxzzzzx.com" target="_blank">亚洲精品国产精品乱码不99</a>| <a href="http://cnepu.com" target="_blank">8x8x华人永久免费视频</a>| <a href="http://xyjxnhcl.com" target="_blank">亚洲婷婷第一狠人综合精品</a>| <a href="http://714747.com" target="_blank">国产精品免费看久久久久</a>| <a href="http://fsdyzs.com" target="_blank">一级成人a免费视频</a>| <a href="http://ycjs999.com" target="_blank">亚洲av永久无码精品国产精品</a>| <a href="http://tom-erc20.com" target="_blank">鲁大师在线影院免费观看</a>| <a href="http://gzbaida.com" target="_blank">99久久婷婷国产综合亚洲</a>| <a href="http://tv886.com" target="_blank">可以免费观看的一级毛片</a>| <a href="http://masfd.com" target="_blank">97在线免费观看视频</a>| <a href="http://obtainfo.com" target="_blank">亚洲国产成人无码av在线播放</a>| <a href="http://www22432.com" target="_blank">夫妻免费无码V看片</a>| <a href="http://cz655.com" target="_blank">亚洲免费日韩无码系列</a>| <a href="http://600c28.com" target="_blank">亚洲精品白色在线发布</a>| <a href="http://www-92109.com" target="_blank">男女交性永久免费视频播放</a>| <a href="http://qestest.com" target="_blank">国产精品99爱免费视频</a>| <a href="http://aqddv.com" target="_blank">亚洲码一区二区三区</a>| <a href="http://33uub.com" target="_blank">免费国产在线观看</a>| <a href="http://zhaoav7.com" target="_blank">国内精品免费视频精选在线观看</a>| <a href="http://fsrongxing.com" target="_blank">亚洲人成电影在线观看青青</a>| <a href="http://yjjinfeng.com" target="_blank">国产小视频在线免费</a>| <a href="http://88109a.com" target="_blank">十八禁在线观看视频播放免费</a>| <a href="http://w9366.com" target="_blank">亚洲无线一二三四区</a>| <a href="http://pohezi.com" target="_blank">亚洲一区视频在线播放</a>| <a href="http://sk7758.com" target="_blank">久久精品免费全国观看国产</a>| <a href="http://www-64000.com" target="_blank">一级黄色毛片免费看</a>| <a href="http://yzddcpj.com" target="_blank">亚洲a∨无码男人的天堂</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>