idea java web 使用说明

String realPath = request.getSession().getServletContext().getRealPath(uploadPath);//上传压缩包所在目录
        // E:\\ideParentDirectory\\springmvc\\target\\springmvc\\assets\\upload\\zips\\    
获取resource路径
String str = this.getClass().getClassLoader().getResource("/").getPath();        
    /E:/ideParentDirectory/springmvc/target/springmvc/WEB-INF/classes/   

posted @ 2017-11-10 15:36  透明的红萝卜  阅读(165)  评论(0编辑  收藏  举报