I am using the POI package for reading Excel file and the File type for input. My servlet code goes as follows:
If I have the excel file (test1.xls) in my D: drive, once selected, the servlet takes the path of tomcat folder instead of taking D:/test1.xls.
It takes the path:
C:\Program Files (x86)\Apache Software Foundation\Apache Tomcat 7.0.27\bin\testing2.xls
INSTEAD OF TAKING
Please help with a solution
Bear Bibeault wrote:You're going about it all wrong. You can't use normal Java file I/O to read a file on the client from code running on the server.
Please see the ServletsFaq and JspFaq for information on file uploading. You need to use HTTP, not file I/O.
Can you please help me with the code ?