In development mode in eclipse with jetty the fileupload works just fine. I upload a file and do stuff and finally print the results. I use xampp tomcat server, but the upload doesn’t work on tomcat. has anyone an idea how to solve? I’m using commons-fileupload.jar
There must be some log somewhere, either on the server-side (catalina.out) or in your browser’s error console and/or developer tools.
yes, indeed. sorry for the few information.
*Jan 03, 2012 2:29:58 PM com.allen_sauer.gwt.log.server.ServerLogImplJDK14 log
fatal: blubb\file.csv (File not found) in class com.package.server.IKimoServerImpl*
so on tomcat it cannot find the file, but it works in development mode
@Adel Boutros
String currentDir = new File("").getAbsolutePath();
File tempDir = new File(currentDir+"/blubb");
if (!tempDir.exists()) {
tempDir.mkdirs();
}
it still doesn’t create the folder.
I start tomcat with xampp and press the start button and restart the it with the tomcat manager
Apparently, you have misplaced your file. Don’t forget java uses relative path to find a file. In your case it is searching for the file blubb\file.csv which is not found in the correct place.
Don’t forget the “path” here is relative to where you launched the tomcat from.
It works in eclipse, because eclipse knows how to adjust the path based on its own classpath ..