Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Uploading file not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Uploading file not working" Watch "Uploading file not working" New topic

Uploading file not working

Shirley Ho

Joined: Dec 03, 2002
Posts: 7
Im having errors when i upload files onto the server.
Uploaded Files Directory [] is invalid. at http.utils.multipartrequest.MultipartRequest.( at http.utils.multipartrequest.ServletMultipartRequest.( at uploadinternaladmin.doPost( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.tomcat.core.ServletWrapper.doService( at org.apache.tomcat.core.Handler.service( at org.apache.tomcat.core.ServletWrapper.service( at org.apache.tomcat.core.ContextManager.internalService( at org.apache.tomcat.core.ContextManager.service( at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection( at org.apache.tomcat.service.TcpWorkerThread.runIt( at org.apache.tomcat.util.ThreadPool$ at
Can anyone tell me what is going on??
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Directory [] is invalid.

That is not a directory on the local file system, it's an HTTP url.
Shirley Ho

Joined: Dec 03, 2002
Posts: 7
How to I call the folder in the server to upload my files into the folder???
Ryan Bailey
Ranch Hand

Joined: Feb 26, 2002
Posts: 134
It looks like you are already calling a folder, just not the right one. Look to see where you are defining your folder and change it.
If you are using oreilly's package then the upload directory is defined as an init-parameter in the webapp your servlet is currently in. If this isn't the case then I'm not sure where your upload dir is defined.
Hope this helps,

Java: The power, elegance, and simplicity of a hand grenade
I agree. Here's the link:
subject: Uploading file not working
It's not a secret anymore!