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,

