O'Reilly cos上传组件的使用(1/3) - 上传文件
O'Reilly cos上传组件的下载地址为:
http://www.servlets.com/cos/index.html
CSDN下载地址(无需积分):http://download.csdn.net/source/1089239
下载后,将cos.jar放至WEB-INF/lib目录下 , 重启Tomcat.
upload.html:
<form method="post" action="cos_basic.jsp"
enctype="multipart/form-data">
文件:<input type="file" name="file" />
<input type="submit" value="上传" />
</form>
cos_basic.jsp:
<%@page contentType="text/html;charset=GBK"%>
<%@page import="com.oreilly.servlet.MultipartRequest"%>
<%@page import="java.io.IOException"%>
O'Reilly cos上传组件的使用(1/3) - 上传文件<br />
<%
String saveDir = "C:/";
int maxPostSize = 1*1024*1024;//1MB
String encoding = "GBK";
MultipartRequest multi = null;
try{
multi = new MultipartRequest(request ,
saveDir , maxPostSize , encoding);
}catch(IOException e){
//上传大小超过maxPostSize就会出现IOException
out.println(e.getMessage());
return;
}
out.println("操作完成!");
%>
分享到:
相关推荐
Oreilly 上传组件源码Oreilly 上传组件源码Oreilly 上传组件源码
This is the source code referenced in the O'Reilly Online Course: Developing Android Applications with Java. More information can be found here: http://training.oreilly.com/androidapps-java/
上述程序中用到的jar 博文链接:https://avery-leo.iteye.com/blog/210695
我这里说说cos,它是O'Reilly公司的,O'Reilly的图书是很8错的,这个上传的组件也做得很棒,最重要的是,它是open source的。 下载最新的cos包(http://www.servlets.com/cos/index.html),加入到你的classpath中。
Oreilly - Python Cookbook,python编程人员必备学习手册
文件内容:(不需要下载了) Example code for "Hadoop: The Definitive Guide, Third Edition" by Tom White. Copyright (C) 2011 Tom White, 978-1-449-31152-0 http://www.hadoopbook.com/ ...
docidn.com_oreilly-java-performance-the-definitive-guide-
com.oreilly.servlet
JavaPerformceTuning-Oreilly.pdf
O'Reilly Media: Python Cookbook(2 edition) 经典不必多说 http://www.amazon.cn/mn/detailApp/ref=sr_1_1?_encoding=UTF8&s=books&qid=1282820211&asin=B003LPO4KS&sr=8-1 ...
使用Ionic框架构建混合移动应用程序 该存储库包含在使用Ionic Framework视频构建混合移动应用程序期间构建的每个应用程序的代码。 快速设置-待办事项 npm install -g ionic git clone ...
hadoop工具书籍
这是英文版的。图片是清晰的,这个放心。You may not know much about the Domain Name System − yet − but whenever you use the Internet, you use DNS. Every time you send electronic mail or surf the World...
一、实验目的 ...由《Hive编程指南》(O'Reilly系列,人民邮电出版社)提供,下载地址: https://raw.githubusercontent.com/oreillymedia/programming_hive/master/prog-hive-1st-ed-data.zip 备用下载地址: ...
Oreilly - Python Cookbook, 2nd Edition.chm
* Shell_Programming/OReilly_Awk_and_Sed_2nd_Edition.pdf * Shell_Programming/TCP.IP.Internetworking.with.gawk.pdf * Shell_Programming/Linux.complete.commands.reference.pdf * Shell_Programming/Mastering...
Oreilly.HTML.And.XHTML.The.Definitive.Guide.5th.Edition学习笔记