jspsmart的上传和下载
表单
<form method="POST" ENCTYPE="multipart/form-data" id="upload" name="upload" action="do_upload.jsp">
<input type="file" name="file1" id="file1" />
<input type="Submit" name="Submit2" value="上传批量文件" id="label10" />
</form>
do_upload.jsp操作页面,为什么上传不了呢
<% SmartUpload su=new SmartUpload();
su.initialize(pageContext);
su.setMaxFileSize(10000);
su.setTotalMaxFileSize(20000);
su.setAllowedFilesList("mp3,mp4");// 设定允许上传的文件(通过扩展名限制),仅允许mp3,mp4文件
su.setDeniedFilesList("exe,bat,jsp,htm,html,,");//不允许exe bat jsp htm html
su.upload();
int count= su.save("e:\\upload");
out.println(count+"个文件上传成功!<br>");
%>