用JSP smartupload 上次图片简单实例
来源:互联网 发布:mac发热严重怎么办 编辑:程序博客网 时间:2024/05/01 07:52
在网上收集了一些上传的实例
代码如下:
Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY ,ResultSet.CONCUR_UPDATABLE); //这个必须!
ResultSet rs = stmt.executeQuery("SELECT * FROM TFILES WHERE ID=1");
// if the resultset is not null
if (rs.next()){
// Initialization
mySmartUpload.initialize(pageContext);
// Upload
mySmartUpload.upload();
// upload file in the DB if this file is not missing
if (!mySmartUpload.getFiles().getFile(0).isMissing()){
try {
rs.updateString("FILENAME",mySmartUpload.getFiles().getFile(0).getFileName());
// Add the current file in the DB field
mySmartUpload.getFiles().getFile(0).fileToField(rs,"FILE");
// Update
rs.updateRow();
count++;
} catch(Exception e) {
out.println("An error occurs : " + e.toString());
}
}
}
// Display the number of files uploaded
out.println(count + " file(s) uploaded in the database.");
rs.close();
stmt.close();
con.close();
- 用JSP smartupload 上次图片简单实例
- JSP使用SmartUpload上传图片
- 使用smartupload组件上传图片(jsp+servlet)
- 简单smartupload
- JSP +smartUpload对图片的增删改查
- 使用smartupload完成JSP中图片上传存储
- jsp smartupload教程
- JSP smartupload 文件上传
- jsp-SmartUpload上传
- smartupload jsp 使用
- jsp---->Smartupload例子代码
- SmartUpload+jsp+html
- SmartUpload上传图片
- smartupload图片上传
- 使用SmartUpload上传图片
- 使用smartupload上传图片
- smartUpload简单使用
- jsp SimpleTagSupport 简单实例.
- 各种数据库如何运行sql文件?
- 弹出网页窗口全攻略(html/hta)
- Java容器类(List、ArrayList、Vector、map、HashTable、HashMap)的分析比较
- 套打
- 一项失败的工作(续)
- 用JSP smartupload 上次图片简单实例
- 企业内部USB存储设备的安全解决方案该如何做才好
- C# Socket开发之异步
- 磁带的最优存储(贪心算法)
- CSDN 成为了技术 SNS
- C# Socket开发之同步
- javascript 知识
- jspsmartupload 详细实例(1)
- 一个多socket绑定同一个端口的测试程序