Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7025

Re: servletcontext listener vs servlet with high priority on loading

From "a" <a@mail.com>
Newsgroups comp.lang.java.programmer
Subject Re: servletcontext listener vs servlet with high priority on loading
Date 2011-08-11 11:46 -0700
Organization Netfront http://www.netfront.net/
Message-ID <j2181n$1cb9$1@adenine.netfront.net> (permalink)
References <1VO0q.42336$nj1.39176@newsfe19.iad> <j20nkr$lq2$1@dont-email.me>

Show all headers | View raw


"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 ---

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

servletcontext listener vs servlet with high priority on loading "a" <a@mail.com> - 2011-08-11 04:18 -0700
  Re: servletcontext listener vs servlet with high priority on loading jaap <niemand@meel.homelinux.net> - 2011-08-11 14:37 +0200
  Re: servletcontext listener vs servlet with high priority on loading markspace <-@.> - 2011-08-11 07:06 -0700
    Re: servletcontext listener vs servlet with high priority on loading "a" <a@mail.com> - 2011-08-11 11:46 -0700
      Re: servletcontext listener vs servlet with high priority on loading markspace <-@.> - 2011-08-11 12:16 -0700
        Re: servletcontext listener vs servlet with high priority on loading Lew <lewbloch@gmail.com> - 2011-08-11 12:51 -0700
          Re: servletcontext listener vs servlet with high priority on loading "a" <a@mail.com> - 2011-08-11 13:59 -0700

csiph-web