-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

David Kerber wrote:
> This is a followup to my question about startup parameters.  After
> digging around a bit, it looks like my best bet is to use the Properties
> class to read my settings from a disk file at startup.

That's generally how things are done.

Chuck's note about using ServletContext.getResourceAsStream is a good
one. Since Properties files are always in ISO-8859-1, there's no really
good reason to use a Reader. Just get the stream and allow
Properties.load to read from it.

ServletContext.getResourceAsStream always loads things relative to the
context root (and can look in the WAR file, etc.), so Chuck's example of
"WEB-INF/myConfig.properties" will load a file found in
/your/path/to/deploy/your-webapp/WEB-ING/myConfig.properties".

Hope that helps,
- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFulNL9CaO5/Lv0PARAp2qAJ4lilmNoyqLa5RZ9fEaUTZMlk//BQCdFeoy
S1zp75YBbtbIOquy9MyLUFY=
=xatx
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to