关于DiskFileUpload 的问题

menghui 06-12-18

我在导入import org.apache.commons.fileupload.DiskFileUpload 时会报错,说是:
“import org.apache.commons.fileupload.DiskFileUpload 在import org.apache.commons.fileupload中已经已经被声明”。
到底是为什么呢?
请个位朋友帮帮忙嘛!!!!

1
menghui
2006-12-19 12:56

package servlet;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;


import org.apache.commons.fileupload.DiskFileUpload;//是这一句报的错
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;

public class Servlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";

//Initialize global variables
public void init() throws ServletException {
}

//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
DiskFileUpload diskFileUpload = new DiskFileUpload();
}

//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
doGet(request, response);
}

//Clean up resources
public void destroy() {
}
}