代码如下:
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.jspsmart.upload.*;
public class servletUpload extends HttpServlet{
private ServletConfig config;
final public void init(ServletConfig config)throws ServletException {
this.config=config;}
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException,
IOException {
PrintWriter out=response.getWriter();
out.println("the method of the html form muse be post");}
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws
ServletException,IOException {
PrintWriter out=response.getWriter();
int count=0;
SmartUpload mySmartUpload=new SmartUpload();
try{
mySmartUpload.initialize(config,request,response);
mySmartUpload.upload();
count=mySmartUpload.save(mySmartUpload.getRequest().getParameter("path"));
out.println(count+"file upload");
}
catch(Exception ex){
out.println("Unable to upload the fie<br>");
out.println("Error:" +ex.toString());
}
}
}
编译的时候出现错误如下:“无法访问javax.servlet.jsp.PageContext,未找到javax.servlet.jsp.PageContext的类文件”。
我想请问下怎么设置才能找到这个类文件