Web工程下读取文件的几种方法

一、读取文件系统路径文件 * 必定要使用绝对路径jsp String fileName = getServletContext().getRealPath("/index.jsp"); // 读取WebRoot下 String fileName2 = getServletContext().getRealPath( "/WEB-INF/a.properties");// 读取WebRoot/WEB
相关文章
相关标签/搜索