|
From: Craig L. C. <cc...@mq...> - 2003-12-04 18:07:59
|
Hi Chris, > I'd be inclined to use a Servlet initialisation parameter myself, > rather than a system property. It would then go in the XML or API > invoking that particular servlet, so it would remain physically > adjacent to where it was used. >=20 > This would also meet your desire to not have the values iterated over > on every script (servlet) execution. >=20 I agree with you in principal. This is an environment variable that must = be passed to the CGI script. Since java doesn't give you a way to get = at the env var directly, you have to configure it in somehow and using = XML or an API would the cleanest way to specify customization. However, = an XML file can't pick up an environment variable. I don't want to have = to tell my users "Find out what SYSTEMROOT is set to and put that here", = I want a solution that I can just give them, e.g. a run.bat that has the = right settings in it and they just invoke run.bat. > Second point: I think Greg has been getting a bit worried by just how > many settings are being carried via the system properties. Some OSs > seem limited in command length (see other thread earlier today) and > scripts are not nice places in which to mix release-specific and > site-specific settings. I don't know what his thoughts are on an > alternative. Perhaps property files or an extension to the XML / API > config arrangements? >=20 Again, unless the properties file or the xml has a way to pickup up the = environment variable, it is far from optimal. Unfortunately, I don't = see any other way to do it than by using System properties. The only = other option is to write some JNI bindings, but I'm sure you would find = that far less desirable than System properties. I'm open to more = suggestions, so feel free to pose them. > Chris >=20 Cheers, Craig |