You can use servlet init params and then query the parameters from servletconfig , use the values to initialize the log4j and other stuffs. You can pass initialization parameter to servlets from web.xml.
But context listeners is a better option. [ May 15, 2007: Message edited by: Rahul Bhattacharjee ]
If you have a lot of config / property file for your application then put the config directory name as init param to the server and then use the servlet's init method to take config files one by one and initialize sub systems respectively.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com