救命啊!我在使用jspsmartUpload文件,遇到一个很奇怪的问题,大虾救命,在线等待

lgcfm 2002-04-18 11:50:39
我在jbuilder6中写了个Servlet

但是我在编译的时(用JBUILDER),它总是把upload的下面的确SmartUpload.class和SmartUploadException.class

删除掉!导致我的程序找不到SmartUpload类,这是怎么回事情

我是TOMCAT4。0
我的程序是这样的

package corp;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import com.jspsmart.upload.SmartUpload;
/**
* <p>Title: 红网企业工程</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: Rednet.com.cn</p>
* @author Coris
* @version 1.0
*/

public class UploadServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GB2312";
//Initialize global variables
private ServletConfig config;
public void init(ServletConfig config) throws ServletException {
this.config = config;
}
int count=0;
SmartUpload myup = new SmartUpload();
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// Variables
try{
myup.initialize(config,request,response);
myup.setAllowedFilesList("jpg,gif,bmp,png,ico");
myup.setDeniedFilesList("asp,php,jsp,exe,cfm,com,js,css,bat");
myup.setMaxFileSize(1048576);
myup.setDenyPhysicalPath(true);
myup.upload();
myup.save("/images/",myup.SAVE_VIRTUAL);

HttpSession session = request.getSession();
// String user = (String)session.getAttribute("username");

}
catch(com.jspsmart.upload.SmartUploadException e){
System.out.print(e.getMessage());

}
}
}
//Clean up resources

...全文
1 点赞 收藏 1
写回复
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
lgcfm 2002-04-18
没人知道吗
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告