Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: servletcontext listener vs servlet with high priority on loading Date: Thu, 11 Aug 2011 07:06:12 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: <1VO0q.42336$nj1.39176@newsfe19.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 11 Aug 2011 14:06:19 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="22338"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zBvltF/erdMzUtSByajJBI/GJpQHL/N8=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <1VO0q.42336$nj1.39176@newsfe19.iad> Cancel-Lock: sha1:rdh5fxc2kO3RGTbZv/2vFolJqJY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7019 On 8/11/2011 4:18 AM, a wrote: > I cannot use this class because it has not been loaded when the > servlet context event is sent. I'd have to go check my JEE stuff again but I'd say in general the context listener is superior. Loading order has to be manually maintained. Context listeners fire automatically. > > I used to use a class with static logger to standardize the format of the > log. For this particular application, there are already ways to initialize your logger (both the standard SE one and log4j). Why are you not using the standard configuration files?