Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Tomcat 运行 Java Web 应用程序,并且我想读取Properties位于我的WEB-INF目录中的文件。我怎样才能得到InputStream这个Properties文件,以便我可以阅读它?
Properties
WEB-INF
InputStream
ServletContext.getResource/ getResourceAsStream,IIRC。
ServletContext.getResource
getResourceAsStream