上传文件
怎么上传不成功呢,还不报异常
<%@ page contentType="text/html;charset=gb2312" language="java" import="java.io.*,java.awt.Image,java.awt.image.*,com.sun.image.codec.jpeg.*,java.sql.*,com.jspsmart.upload.*,java.util.*"%>
<html>
<head>
<title>文件上传处理页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
SmartUpload mySmartUpload = new SmartUpload();
int count = 0;
mySmartUpload.initialize(pageContext);
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>