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.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

config.ini file

 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic