开发者

How to get browsed filepath in jsp..............?

开发者 https://www.devze.com 2023-03-01 06:15 出处:网络
Hi i am selecting a txt/XLS file throughand need to pass the same to a function to read the content and its not happening for me ....... how can i pass file path to file content reader Function

Hi i am selecting a txt/XLS file through and need to pass the same to a function to read the content and its not happening for me ....... how can i pass file path to file content reader Function

Code am using to Browse file:

    <input type="file" name="uploadfile" id="uploadfile" size="40" value=""/>

BufferedReader bF =  new BufferedReader(new FileReader(*** File Path here ***));

BufferedReader bF =  new BufferedReader(new FileReader("cia.txt"));

I want to get dy开发者_开发问答namic selected files into file reader......

Thank you..


If variable "uploadfile" is an File type variable(need to be) then try uploadfile.getAbsolutePath()

Btw what server side technology you are using(framework)


You need to use something like Apache Commons FileUpload to process uploaded files.

0

精彩评论

暂无评论...
验证码 换一张
取 消