资源简介

JavaWeb编写上传、下载页面,使用主要使用SmartUpload,并且实现文件搜索、展示、图片拖拽上传。

资源截图

代码片段和文件信息

package com.gyt.smartUpload;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet Filter implementation class CharsetSessionCheckFilter
 */
@WebFilter(“/*“)
public class CharsetFilter implements Filter {

    /**
     * Default constructor. 
     */
    public CharsetFilter() {
        // TODO Auto-generated constructor stub
    }

/**
 * @see Filter#destroy()
 */
public void destroy() {
// TODO Auto-generated method stub
}

/**
 * @see Filter#doFilter(ServletRequest ServletResponse FilterChain)
 */
public void doFilter(ServletRequest request ServletResponse response FilterChain chain) throws IOException ServletException {
// TODO Auto-generated method stub
// place your code here
/* 强制转换请求响应类型 */
/* HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;*/

/* 请求和响应的编码设置 */
request.setCharacterEncoding(“UTF-8“);
response.setContentType(“text/html;charset=UTF-8“);

// pass the request along the filter chain
chain.doFilter(request response);
}

/**
 * @see Filter#init(FilterConfig)
 */
public void init(FilterConfig fConfig) throws ServletException {
// TODO Auto-generated method stub
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1406  2018-12-08 20:20  FileSmartUpload\.classpath

     文件        915  2018-12-07 18:46  FileSmartUpload\.project

     文件        567  2018-12-07 18:46  FileSmartUpload\.settings\.jsdtscope

     文件        364  2018-12-07 18:45  FileSmartUpload\.settings\org.eclipse.jdt.core.prefs

     文件        497  2018-12-07 18:46  FileSmartUpload\.settings\org.eclipse.wst.common.component

     文件        345  2018-12-07 18:46  FileSmartUpload\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2018-12-07 18:46  FileSmartUpload\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2018-12-07 18:46  FileSmartUpload\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       1403  2018-12-09 20:15  FileSmartUpload\build\classes\com\gyt\smartUpload\CharsetFilter.class

     文件       5494  2018-12-09 21:17  FileSmartUpload\build\classes\com\gyt\smartUpload\ListFileServlet.class

     文件       3494  2018-12-08 21:42  FileSmartUpload\build\classes\com\gyt\smartUpload\SmartDownloadServlet.class

     文件       4816  2018-12-11 19:20  FileSmartUpload\build\classes\com\gyt\smartUpload\SmartUploadServlet.class

     文件       1647  2018-12-09 20:15  FileSmartUpload\src\com\gyt\smartUpload\CharsetFilter.java

     文件       6858  2018-12-09 21:17  FileSmartUpload\src\com\gyt\smartUpload\ListFileServlet.java

     文件       3665  2018-12-08 10:19  FileSmartUpload\src\com\gyt\smartUpload\SmartDownloadServlet.java

     文件       5010  2018-12-11 19:20  FileSmartUpload\src\com\gyt\smartUpload\SmartUploadServlet.java

     文件       7632  2018-12-09 21:17  FileSmartUpload\WebContent\home-smart.jsp

     文件       2430  2018-12-09 21:13  FileSmartUpload\WebContent\imgUpload.jsp

     文件         39  2018-12-07 18:46  FileSmartUpload\WebContent\meta-INF\MANIFEST.MF

     文件      53485  2018-12-04 18:49  FileSmartUpload\WebContent\static\css\animate.min.css

     文件     117154  2018-12-04 18:49  FileSmartUpload\WebContent\static\css\bootstrap.min.css

     文件       2230  2018-12-09 15:38  FileSmartUpload\WebContent\static\css\home-smart.css

     文件      13615  2018-12-09 10:32  FileSmartUpload\WebContent\static\css\style.css

     文件       1097  2018-12-04 18:49  FileSmartUpload\WebContent\static\css\style2.css

     文件      10038  2018-12-04 18:49  FileSmartUpload\WebContent\static\css\vegas.min.css

     文件     823845  2018-12-04 18:49  FileSmartUpload\WebContent\static\img\bannerq1.jpg

     文件     156408  2018-12-07 21:27  FileSmartUpload\WebContent\static\img\bannerq11.jpg

     文件     940115  2018-12-04 18:49  FileSmartUpload\WebContent\static\img\bannerq2.jpg

     文件    1447656  2018-12-04 18:49  FileSmartUpload\WebContent\static\img\bannerq3.jpg

     文件     152207  2018-12-04 18:49  FileSmartUpload\WebContent\static\img\bannerq4.jpg

............此处省略46个文件信息

评论

共有 条评论