File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Upload File Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Upload File Error" Watch "Upload File Error" New topic

Upload File Error

amol amlya

Joined: Mar 16, 2005
Posts: 1

I am using Jason Hunter's MultipartRequest class to upload a file via a servlet for my student project. I am using tomcat. I have an images directory in Webapps/ROOT where I want to upload my file. I specified "./images/" in the multipartrequest constructor and it worked on windows and the file got uploaded correctly. Now, I've ported everything into linux (with the same directory structure and same code). But it now gives an illegal argument exception saying that ./images/ is not a directory. Is there a different naming convention for apache tomcat on unix/linux for directories inside the server root?

Please help. I hate to go back to windows again.

Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Post some code snippet.
Where is your image directory? is it <context path>/images?
I agree. Here's the link:
subject: Upload File Error
It's not a secret anymore!