String path= ContextLoader.getCurrentWebApplicationContext().getServletContext().getRealPath("/WEB-INF/spring/config.properties") ; Properties p=new Properties(); try { p.load(new FileInputStream(path)); System.out.println(p.getProperty("uploadPath")); } catch (Exception e) { e.printStackTrace(); }