在eclipse使用commons.uploadfile时提示"The type DiskFileUpload is deprecated",请问这是为什么
在eclipse使用commons.uploadfile时,语句"DiskFileUpload fu = new DiskFileUpload ();"
上被画了横线,并提示“The type DiskFileUpload is deprecated”,请问这是为什么?
package com.upload;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.io.*;
public class Upload extends HttpServlet {
/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try{
DiskFileUpload fu = new DiskFileUpload ();
}
catch(Exception e){
}
}
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occure
*/
public void init() throws ServletException {
// Put your code here
}
}