Use web.xml as mrcoffee says or you can do
InputStream = getClass().getResourceAsSt
and put x.ini in the classes directory
Main Topics
Browse All TopicsHi,
I'm using tomcat 5.5.27, and i'm loading some configuration parameters via a standard .ini file into my servlet. the problem i'm having is in wiring up a local context - when i try a System.getProperty("user.d
cheers!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: mrcoffee365Posted on 2008-12-15 at 09:06:41ID: 23175377
We use webapp web.xml for configuration parameters. I think that's the recommended way to do it. That also makes it local to your webapp, which would be local to your servlet environment.
I don't know how your system returns the Tomcat /bin directory -- on our installation of Tomcat 5.5.23, user.dir returns the top of the Tomcat directory. /bin would be a subdirectory under it.
context.xml for a host certainly works for us -- if your catalina output says it is being ignored, it's probably because of a problem in it or an overriding specification somewhere else.