問題描述
在我的 jsp 頁(yè)面中,使用文件上傳并將字符串文件傳遞到 java 頁(yè)面以復(fù)制到特定文件夾.我想要復(fù)制文件的完整路徑.但我只得到一個(gè)帶擴(kuò)展名的文件名.
In my jsp page, use file uploading and pass file for string to java page for copy to particular folder. I want whole path for copying my file. but i get only a file name with extension.
掃描文件:ABC.pdf
scan file : ABC.pdf
它只顯示:ABC.pdf
it show only : ABC.pdf
我要顯示:c:/abc.pdf
i want to show: c:/abc.pdf
推薦答案
JSP 確實(shí)是一種服務(wù)器端技術(shù).以下是一些使用 JSP 上傳文件的鏈接.
JSP is indeed a Server side technology. Here are few of the links to do a file upload using JSP.
http://www.tutorialspoint.com/jsp/jsp_file_uploading.htm
http://corejavaexample.blogspot.在/2013/04/how-to-upload-file-in-jsp.html
http://javarevisited.blogspot.in/2013/07/ile-upload-example-in-servlet-and-jsp-java-web-tutorial-example.html
希望這可以幫助您解決問題.
Hope this may help solve your issue.
這篇關(guān)于如何獲取在jsp中上傳文件的完整路徑?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!