Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -39,7 +39,9 @@ public class UploadHandleServlet extends HttpServlet {
|
|||||||
|
|
||||||
//得到上传文件的保存目录,将上传的文件存放于WEB-INF目录下,不允许外界直接访问,保证上传文件的安全
|
//得到上传文件的保存目录,将上传的文件存放于WEB-INF目录下,不允许外界直接访问,保证上传文件的安全
|
||||||
String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
|
String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
|
||||||
|
savePath= this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload").replace("\\out\\artifacts\\hellogithub_war_exploded\\WEB-INF\\upload","\\web\\uploadFile");
|
||||||
|
System.out.println(savePath);
|
||||||
|
// savePath="D:\\Java\\helloG\\hellogithub\\web\\uploadFile";
|
||||||
// String savePath="E:\\Desktop\\out";
|
// String savePath="E:\\Desktop\\out";
|
||||||
//上传时生成的临时文件保存目录
|
//上传时生成的临时文件保存目录
|
||||||
String tempPath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"tmp");
|
String tempPath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"tmp");
|
||||||
|
|||||||
Reference in New Issue
Block a user