org.apache.commons.fileupload.*..... exception.

Hi,

i am trying to upload a file using org.apache.commons.fileupload package, but when i am trying to execute following program i get Exception

try{

res.setContentType("text/html");

PrintWriter pw = res.getWriter();

pw.println("<html>");

pw.println("<head><title>Hello</title></head>");

pw.println("<body>hi");

DiskFileUpload fileUpload =new DiskFileUpload();

List list =null;

try

{

list = fileUpload.parseRequest(req);

}

catch(FileUploadException ex)

{

thrownew ServletException("Wrapped",ex);

}

Iterator iter = list.iterator();

while (iter.hasNext()){

FileItem item = (FileItem) iter.next();

if (!item.isFormField()){

File itemFile =new File(item.getName());

File destDir =new File(getServletContext().getRealPath("/")

+"stored");

if(!destDir.exists()){

destDir.mkdirs();

}

File destFile =new File(getServletContext().getRealPath("/")

+"stored"+File.separator+itemFile.getName());

pw.println(item);

pw.println(destFile);

try

{

item.write(destFile);

}

catch(Exception ex)

{

//throw new ServletException("Wrapped",ex);

pw.println(ex.getMessage());

}

}

}

pw.println("</body>");

pw.println("</html>");

pw.close();

}

catch(Exception ex){}

following is Exception

java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream

any suggestion or solution will be appriciated

Thanks in advance,

[2985 byte] By [Rutveja] at [2007-10-2 18:27:16]
# 1
Classpath? Missing JAR?
CeciNEstPasUnProgrammeura at 2007-7-13 19:48:26 > top of Java-index,Java Essentials,Java Programming...
# 2
i have set ClassPath and also JAR is not missing. list = fileUpload.parseRequest(req);error is at above line for req objectany sugestions will be appreciated.Thanks in advance.
Rutveja at 2007-7-13 19:48:26 > top of Java-index,Java Essentials,Java Programming...
# 3
Did you check whether all necessary jars are available? That can be some dependency, that is, some class fileUpload depends on.
BIJ001a at 2007-7-13 19:48:26 > top of Java-index,Java Essentials,Java Programming...