我已经达到了这个目的:
private Properties logoUrls = new Properties();
logoUrls.load(new FileInputStream("channelLogos.properties"));
Run Code Online (Sandbox Code Playgroud)
其中channelLogos.properties与我的JSP位于同一目录中.我得到一个FileNotFound异常.我的应用程序实际上认为我的意思是"channelLogos.properties",如果不是与JSP相同的目录?如何确定加载属性文件的正确路径?