code: public static Properties loadFromResource(ServletContext servletContext, String resource) throws IOException {
  		Properties props = new Properties();
  		InputStream in = servletContext.getResourceAsStream(resource);
  		if(in==null) throw new LocalizedIOException(accessor, "PropertiesUtils.readProperties.resourceNotFound", resource);
  		try {
  			props.load(in);
  		} finally {
  			in.close();
  		}
  		return props;
  	}
docs: Loads properties from a web resource.