Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Upload Path Problem

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MultipartRequest multi = new MultipartRequest(req,getServletContext().getRealPath("/UploadedPics/"));

1) It works fine on my labtop

2) My dedicated server is using Apache and Tomcat with mod_jk connectors. When am uploading to my website then it throws error
IllegalArgumentException: Not a directory: /opt/apache-tomcat-5.5.23/webapps/mywebsite/UploadedPics

I created the directory and file uploaded but How will I access this link from my servlet http://www.mywebsite.com/UploadedPics

Thanks & best regards
[ May 07, 2008: Message edited by: Farakh khan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic