使用jspSmartUpload上传文件,提示已经上传了,但就是找不到?

代码:(使用Eclipse for J2EE开发环境)
FileUpload.html
<html>
<head>
<title>File Upload</title>
</head>
<body>
<form name = "form1" method = "post" action = "upload.jsp" enctype = "multipart/form-data">
<input type = "file" name = "file1" size = "50"/><br>
<input type = "submit" value = "submit"/>
</form>
</body>
</html>

upload.jsp:
<%@ page language="java" import = "com.jspsmart.upload.*" contentType="text/html; charset=GBK"%>
<html>
<head>
<title>Upload JSP</title>
</head>
<body>

<%
SmartUpload mySmartUpload = new SmartUpload();
int count = 0;
mySmartUpload.initialize(pageContext);
out.println(pageContext.toString()+"<br>");
mySmartUpload.setTotalMaxFileSize(100000);
mySmartUpload.setAllowedFilesList("doc,txt,jpg");
mySmartUpload.upload();
try {
count = mySmartUpload.save("/upload");
out.println(count+" file(s) upload.");
} catch (Exception e) {
e.printStackTrace();
}
%>
</body>
</html>

第1个回答  2013-07-26
在你的项目目录下搜索你上传的文件名字就能找到你的文件
第2个回答  2012-03-07
你在tomcat目录下找这文件追问

tomcat下没有。

追答

通过组件传到服务器上的文件里的

第3个回答  2016-03-13
在.metadata里面
相似回答