I'm running Java web application using Tomcat and I want to read a Properties
file that's located in my WEB-INF
directory. How can I get an InputStream
to this Properties
file so I can read it?
我正在使用Tomcat運行Java Web應用程序,我想讀取位於WEB-INF目錄中的Properties文件。如何獲取此Properties文件的InputStream以便我可以讀取它?
ServletContext.getResource
/getResourceAsStream
, IIRC.
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/04/08/4b5b1b1a2280bf6235719c55d7ef3165.html。