得到web项目的根目录路径
System.getProperty("user.dir")//
String path = this.getServletContext().getRealPath("/WEB-INF/order_form.html");
String appPath = filterConfig.getServletContext().getRealPath("/"); //得到根目录路径
得到类所在的路径
FormServlet.class.getClassLoader().getResourceAsStream("FileName");//可以直接读取文件