Results 1 to 4 of 4
  1. #1
    commissioner is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default Image databae compilation problem

    Hi everyone, am developing servlet image upload app. when i run the programm, it displays an error below though i have apache common filesupoad and common i.o at my apache lib. what do i do, Is it that my command prompt cannot compile the code. here is the error


    Java Code:
    C:\Tomcat 6.0\webapps\test\WEB-INF\classes>javac ServletImage.java
    ServletImage.java:6: package org.apache.commons.fileupload.servlet does not exis
    t
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
                                                ^
    ServletImage.java:7: package org.apache.commons.fileupload.disk does not exist
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
                                             ^
    ServletImage.java:8: package org.apache.commons.fileupload does not exist
    import org.apache.commons.fileupload.*;
    ^
    ServletImage.java:16: cannot find symbol
    symbol  : variable ServletFileUpload
    location: class ServletImage
                    boolean isMultipart = ServletFileUpload.isMultipartContent(reque
    st);
                                          ^
    ServletImage.java:21: cannot find symbol
    symbol  : class FileItemFactory
    location: class ServletImage
                            FileItemFactory factory = new DiskFileItemFactory();
                            ^
    ServletImage.java:21: cannot find symbol
    symbol  : class DiskFileItemFactory
    location: class ServletImage
                            FileItemFactory factory = new DiskFileItemFactory();
                                                          ^
    ServletImage.java:22: cannot find symbol
    symbol  : class ServletFileUpload
    location: class ServletImage
                            ServletFileUpload upload = new ServletFileUpload(factory
    );
                            ^
    ServletImage.java:22: cannot find symbol
    symbol  : class ServletFileUpload
    location: class ServletImage
                            ServletFileUpload upload = new ServletFileUpload(factory
    );
                                                           ^
    ServletImage.java:28: cannot find symbol
    symbol  : class FileUploadException
    location: class ServletImage
                            } catch (FileUploadException e) {
                                     ^
    ServletImage.java:33: cannot find symbol
    symbol  : class FileItem
    location: class ServletImage
                                    FileItem item = (FileItem) itr.next();
                                    ^
    ServletImage.java:33: cannot find symbol
    symbol  : class FileItem
    location: class ServletImage
                                    FileItem item = (FileItem) itr.next();
                                                     ^
    11 errors
    
    C:\Tomcat 6.0\webapps\cyberworld\WEB-INF\classes>

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    You need to provide the classpath to the jars you need ...-cp <enter list of jars here>.
    Why are you developing in the webapp directory?

  3. #3
    asmitarnd is offline Member
    Join Date
    Mar 2011
    Posts
    22
    Rep Power
    0

    Default

    the error is related to importing packages necessary for ur application just do check it

  4. #4
    commissioner is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Unresolved compilation problem
    By ls7897 in forum New To Java
    Replies: 9
    Last Post: 03-09-2011, 01:42 AM
  2. Compilation Problem
    By whosadork in forum New To Java
    Replies: 6
    Last Post: 09-10-2008, 02:50 AM
  3. compilation error(version problem?)
    By Ms.Ranjan in forum New To Java
    Replies: 3
    Last Post: 07-11-2008, 04:31 PM
  4. Unresolved compilation problem
    By mew in forum New To Java
    Replies: 2
    Last Post: 12-30-2007, 07:17 PM
  5. Unresolved compilation problem
    By mew in forum New To Java
    Replies: 3
    Last Post: 12-11-2007, 11:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •