my dog learned polymorphism*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Uploading file not working" Watch "Uploading file not working" New topic
Author

Uploading file not working

Shirley Ho
Greenhorn

Joined: Dec 03, 2002
Posts: 7
Im having errors when i upload files onto the server.
Uploaded Files java.io.IOException: Directory [http://www.enpgroup.com.sg/internal] is invalid. at http.utils.multipartrequest.MultipartRequest.(MultipartRequest.java) at http.utils.multipartrequest.ServletMultipartRequest.(ServletMultipartRequest.java) at uploadinternaladmin.doPost(uploadinternaladmin.java:26) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484)
Can anyone tell me what is going on??
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Directory [http://www.enpgroup.com.sg/internal] is invalid.

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

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
Shirley,
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,
Ryan


SCJP 1.4, SCWCD
Java: The power, elegance, and simplicity of a hand grenade
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uploading file not working