你这样取路径就不对了 String filePath = this.getServletContext().getRealPath("WEB-INF"+File.separator+"info.properties"); 参考下文章http://blog.csdn.net/shendl/archive/2006/12/03/1427475.aspx