资源简介
实现上传文件和下载等功能的jspsmartupload插件
代码片段和文件信息
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.jspsmart.upload.*;
public class servletUpload extends HttpServlet {
private ServletConfig config;
/**
* Init the servlet
*/
final public void init(ServletConfig config) throws ServletException {
this.config = config;
}
final public ServletConfig getServletConfig() {
return config;
}
/**
* Handles GET requests
*/
public void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
PrintWriter out = response.getWriter();
out.println(““);
out.println(““);
out.println(“jspSmartUpload : Servlet Sample
“);
out.println(“
“);
out.println(“The method of the HTML form must be POST.“);
out.println(““);
out.println(““);
}
/**
* Handles POST requests
*/
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
PrintWriter out = response.getWriter();
out.println(““);
out.println(““);
out.println(“jspSmartUpload : Servlet Sample
“);
out.println(“
“);
// Variables
int count=0;
SmartUpload mySmartUpload = new SmartUpload();
try {
// Initialization
mySmartUpload.initialize(configrequestresponse);
// Upload
mySmartUpload.upload();
// Save the file with the original name
// in a virtual path of the web server
count = mySmartUpload.save(mySmartUpload.getRequest().getParameter(“PATH“));
// Display the result
out.println(count + “ file uploaded.“);
} catch (Exception e){
out.println(“Unable to upload the file.
“);
out.println(“Error : “ + e.toString());
}
out.println(““);
out.println(““);
}
/**
* Destroy the servlet
*/
public void destroy () {
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2008-11-24 11:16 jspsmartupload\
文件 2837 2000-03-22 15:04 jspsmartupload\default.htm
目录 0 2000-09-04 10:35 jspsmartupload\help\
文件 2188 2000-05-18 16:56 jspsmartupload\help\arbo.gif
目录 0 2000-09-04 10:35 jspsmartupload\help\doc\
文件 985 2000-07-12 15:33 jspsmartupload\help\doc\allclasses-fr
目录 0 2000-09-04 10:35 jspsmartupload\help\doc\com\
目录 0 2000-09-04 10:35 jspsmartupload\help\doc\com\jspsmart\
目录 0 2000-09-04 10:35 jspsmartupload\help\doc\com\jspsmart\upload\
文件 19669 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\File.html
文件 9721 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\Files.html
文件 1234 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\package-fr
文件 5017 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\package-summary.html
文件 4553 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\package-tree.html
文件 10928 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\Request.html
文件 39765 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\SmartUpload.html
文件 6397 2000-07-12 15:33 jspsmartupload\help\doc\com\jspsmart\upload\SmartUploadException.html
文件 5985 2000-07-12 15:33 jspsmartupload\help\doc\deprecated-list.html
文件 6793 2000-07-12 15:33 jspsmartupload\help\doc\help-doc.html
文件 21120 2000-07-12 15:33 jspsmartupload\help\doc\index-all.html
文件 725 2000-07-12 15:33 jspsmartupload\help\doc\index.html
文件 4440 2000-07-12 15:33 jspsmartupload\help\doc\overview-tree.html
文件 21 2000-07-12 15:33 jspsmartupload\help\doc\package-list
文件 691 2000-07-12 15:33 jspsmartupload\help\doc\packages.html
文件 4246 2000-07-12 15:33 jspsmartupload\help\doc\serialized-form.html
文件 1269 2000-07-12 15:33 jspsmartupload\help\doc\st
文件 9046 2000-03-27 18:18 jspsmartupload\help\Errors.htm
文件 15740 2000-05-18 09:27 jspsmartupload\help\Fileob
文件 3677 2000-03-28 13:33 jspsmartupload\help\Filesob
文件 7148 2000-07-12 17:59 jspsmartupload\help\jspSmartUpload-InpriseAS-En.htm
文件 8260 2000-07-12 17:59 jspsmartupload\help\jspSmartUpload-iPlanet-En.htm
............此处省略47个文件信息
相关资源
- 八套java web项目源码及视频讲解分享
- 简单博客系统
- JSP课程设计个人信息系统
- JSP、JavaBean和Servlet完成一个简单的留
- jsp+sql实验室管理系统
- java web 外文文献
- jsp servlet javabean实现的简单网上购物车
- 通过JSP实现 图片上传
- WINDOWS 环境下用JAVA 实现WEB 服务器
- jsp中使用echarts
- JSP校园二手市场交易平台论文及毕业
- ssm框架开发北大青鸟超市后台管理系
- 粒子群算法PSO解决柔性作业车间调度
- 购物系统设计与实现外文资料
- 基于 JSP/Servlet 的头像设置功能实现
- JSP+Application聊天室
- JSP+Servlet调查问卷
- jsp界面弄的简单的抽奖项目
- 简单的jsp新闻发布网站
- java web实现文件的上传
- JAVAWEB批量文件器
- maven-archetype-webapp-1.0.jar
- jsp+web+简单学生管理系统+mysql
- spring-web.jar
- JSP版_成绩录入查询系统
- javaweb购物车(全)
- JSP+access网上投票系统
- 纯Jsp+oracle写的一个Student 增删改查服
- GPS北斗车辆监控设备之javaWEB平台
- javaweb 教室占座系统案例
评论
共有 条评论