Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File Path problem in excel file upload  RSS feed

 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,

I have created an application that reads an excel file and stores its values as rows in DB. I have used POI Api.

It is working well in my system(localhost). But gives 'FileNotFound' Exception when its deployed in server.

Also i am using AJAX technology.

Note:
To test it i added alert box to display file path before submiting to servlet.
It displays like "C:fakePath/aaaaa.xls".
But It Should be "C:....../aaaa.xls"

I dont know is this javascript problem/html/POI api problem.

Please help me,
Anbarasu

 
Rob Spoor
Sheriff
Posts: 20904
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you creating the path to the file? Are you using ServletContext's getRealPath method?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!