开发者

How to know the File path in servlet [duplicate]

开发者 https://www.devze.com 2022-12-27 11:15 出处:网络
This question already has answers here: How can I upload files to a server using JSP/Servlet? (14 answers)
This question already has answers here: How can I upload files to a server using JSP/Servlet? (14 answers) 开发者_如何学Go Closed 6 years ago.

If I upload any file in the JSP then how i know the full path of the location where the file is save on servlet.


For uploading files using JSP/Servlet, it is suggested to use Apache's Commons FileUpload library: http://commons.apache.org/fileupload/

Then you can explicitly say where you want to save the uploaded file. For example, you might want to save it into the c:\my_files directory. To get started, you can read this tutorial. For more information, please read FileUpload's Guide.

0

精彩评论

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