I have a servlet, InitParams, that starts up with the server and puts a property object in the context and is nicely available from all the servlets. However, I have a series of utility classes in a different package that are not servlets that are called from the servlets. What's the easiest way to have those classes get access to the Properties object? The only way I can think of is to pass the Properties object to each and every one of these methods. There must be a better way. Any help appreciated. Thanks
posted 15 years ago
I think I figured out how to do it. I set up a singleton class which I use to put the properties in from the InitParams servlet. Then, this class is available from any of the utility classes as well as from all the servlets.