当前位置: 代码迷 >> Java Web开发 >> [求助] 关于使用jspsmartupload出错问题
  详细解决方案

[求助] 关于使用jspsmartupload出错问题

热度:97   发布时间:2007-03-28 15:42:15.0
[求助] 关于使用jspsmartupload出错问题

代码如下:
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的类文件”。
我想请问下怎么设置才能找到这个类文件

搜索更多相关主题的帖子: void  request  private  public  import  

----------------解决方案--------------------------------------------------------

应该是没找到jar,add 这个jar就行了


----------------解决方案--------------------------------------------------------

高手黄能具体点吗?
我是是个菜鸟
我在lib文件夹里找了,没有这个jar ,add 不了,具体是增加哪个文件?
请高手们不奢赐教


----------------解决方案--------------------------------------------------------