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>
3 replies to this topic
#1
Posted 02 April 2011 - 01:08 PM
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
|
|
|
#2
Posted 02 April 2011 - 02:58 PM
This indicates that your Java Compiler cannot locate in any of it's CLASSPATH folders the file org\apache\commons\fileupload\servlet\ServletFileUpload.class and the other imports as well. Are you sure that your class paths have been properly set? Where in your file system are the class files located?
Wow I changed my sig!
#3
Posted 04 April 2011 - 03:29 PM
i have set the path but it seems its not working
#4
Posted 04 April 2011 - 03:51 PM
Thanks now working
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









