X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!zen.net.uk!dedekind.zen.co.uk!news.netfront.net!not-for-mail From: "a" Newsgroups: comp.lang.java.programmer Subject: Re: servletcontext listener vs servlet with high priority on loading Date: Thu, 11 Aug 2011 11:46:04 -0700 Organization: Netfront http://www.netfront.net/ Lines: 34 Message-ID: References: <1VO0q.42336$nj1.39176@newsfe19.iad> NNTP-Posting-Host: 208.91.114.4 X-Trace: adenine.netfront.net 1313088375 45417 208.91.114.4 (11 Aug 2011 18:46:15 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Thu, 11 Aug 2011 18:46:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7025 "markspace" <-@.> wrote in message news:j20nkr$lq2$1@dont-email.me... > 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? > Hi, Thanks for your reply. I build my own version of Log Util based on the log4j. The purpose is for convenience. It involves a lot of static method and static variable. I expect objects can be instantiated in ServletContextListener, but not any static in a class. Is that true? Pls explain. Thanks --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---