diff --git a/src/com/hellogithub/servlet/UploadHandleServlet.java b/src/com/hellogithub/servlet/UploadHandleServlet.java index bc6a7a8..36aca46 100644 --- a/src/com/hellogithub/servlet/UploadHandleServlet.java +++ b/src/com/hellogithub/servlet/UploadHandleServlet.java @@ -39,7 +39,9 @@ public class UploadHandleServlet extends HttpServlet { //得到上传文件的保存目录,将上传的文件存放于WEB-INF目录下,不允许外界直接访问,保证上传文件的安全 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 tempPath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"tmp");