jspsmartupload:File can't be saved (1120).请指教!

Anajian 2005-03-16 01:02:40
<%

// Variables
int count=0;
String systime="";
String path="";
String path1="";
try
{
// Initialization
mySmartUpload.initialize(pageContext);

// Upload
mySmartUpload.upload();

// Select each file
for (int i=0;i<mySmartUpload.getFiles().getCount();i++){

// Retreive the current file
com.jspsmart.upload.File myFile = mySmartUpload.getFiles().getFile(i);

// Save it only if this file exists
if (!myFile.isMissing()) {

systime=String.valueOf(System.currentTimeMillis())+myFile.getFileName();
myFile.saveAs("/uploadpic/"+systime,mySmartUpload.SAVE_VIRTUAL);
count ++;
}
}
session.putValue("systime",systime);
out.println("图片上传成功!");
out.println(path);
out.println(systime);
}
catch (ServletException er)
{
out.print("fail");
}

%>

报错:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: File can't be saved (1120).
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.public_.sample2_jsp._jspService(sample2_jsp.java:109)


说明:这段程序在本地环境运行正常,但是在远程虚拟主机上就出现上面的错误!
...全文
249 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ivy050301 2005-03-19
  • 打赏
  • 举报
回复
uploadpic 目录不存在~~~~~~~~

建个目录
Anajian 2005-03-19
  • 打赏
  • 举报
回复
自己顶一下
wenchaohu213 2005-03-16
  • 打赏
  • 举报
回复
类型出现问题

在好好匹配吧

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧