我的文件上传在WIN下面可以正常上传,在linux上却报错!请各位能够帮我解决一下!谢谢
报错信息是:
org.apache.jasper.JasperException: File can't be saved (1120).
我的源码是:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page session="true" %>
<%@ page language="java"
import="cn.com.sailing.db.*,
cn.com.sailing.util.*,
java.lang.*,
java.sql.*,
java.util.*,
com.jspsmart.upload.*,
cn.com.sailing.order.onlineorder.*,
cn.com.sailing.order.ValueObject.*"
%>
<%
VectorMng vm= new VectorMng();
Vectormng_VO vdb=new Vectormng_VO();
vdb.fill(request);
String path="/var/tomcat4/webapps/sybio/onlineorder/admin/xz/tp/";
String path1="/var/tomcat4/webapps/sybio/onlineorder/admin/xz/xq/";
SmartUpload mySmartUpload =new SmartUpload();
mySmartUpload.initialize(pageContext);
Files fs=mySmartUpload.getFiles();
mySmartUpload.upload();
vdb.YWBM=mySmartUpload.getRequest().getParameter("YWBM");
vdb.YWMC=mySmartUpload.getRequest().getParameter("YWMC");
vdb.ZIL=mySmartUpload.getRequest().getParameter("ZIL");
vdb.ZL=mySmartUpload.getRequest().getParameter("ZL");
vdb.KX=mySmartUpload.getRequest().getParameter("KX");
vdb.DX=Float.parseFloat(mySmartUpload.getRequest().getParameter("DX")) ;
vdb.FZLX=mySmartUpload.getRequest().getParameter("FZLX");
vdb.MCSQS=Float.parseFloat(mySmartUpload.getRequest().getParameter("MCSQS"));
vdb.MCSJS=Float.parseFloat(mySmartUpload.getRequest().getParameter("MCSJS"));
vdb.CYYWF=mySmartUpload.getRequest().getParameter("CYYWF");
vdb.CYYWR=mySmartUpload.getRequest().getParameter("CYYWR");
vdb.SM=mySmartUpload.getRequest().getParameter("SM");
vdb.XL=mySmartUpload.getRequest().getParameter("XL");
vdb.GSWZ=mySmartUpload.getRequest().getParameter("GSWZ");
vdb.SCGS=mySmartUpload.getRequest().getParameter("SCGS");
vdb.TP=mySmartUpload.getRequest().getParameter("TP");
vdb.XQ=mySmartUpload.getRequest().getParameter("XQ");
File f;
for (int i=0;i<fs.getCount();i++){
f=fs.getFile(i);
if (f.getFileName().length()>0){
if(i==0){
vdb.TP=f.getFileName();
f.saveAs(path+f.getFileName());
}
if(i==1){
vdb.XQ=f.getFileName();
f.saveAs(path1+f.getFileName());
}
}
}
vm.updateVectorMng(vdb);
%>
在linux下,文件夹的权限是777。
路径也没有问题,能帮我看一下错在哪吗?