This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
I want to load the reference of config.ini file from a component (class) that will be used in a servlet. What are the options to direct the location of the file for me. Say I want to put my config.ini file in /docweb/WEB-INF directory. Here docweb is my application's name. I'll read a RandomAccessFile to read/write and forward values to a JSP file. AFAI understand, I may use a servlet <init-param> to direct the locationas /docweb/WEB-INF/config.ini or use a ResourceBundle like InputStream in = config.getServletContext().getResourceAsStream("WEB-INF/config.ini"); Is these two approaches Ok, or am I missing any syntax here? Should not Tomcat get them automatically? And any alternate approach? :roll:
Ashik Uzzaman Senior Software Engineer, TubeMogul, Emeryville, CA, USA.