tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Schnack <>
Subject RE: servlets
Date Tue, 28 Jan 2003 21:32:05 GMT
  Well, the short answer is that I need instance variable values from a
servlet (in this case, data from ServletConfig). I could certainly make
my classes ask for the servlet instance as a method parameter, but this
just looks so ugly to my perfectionist eyes :-)

On Tue, 2003-01-28 at 19:27, Wendy Smoak wrote:
> > yes, I know how to do it (private constructor, etc), but how tomcat
> > will call an getInstance() method instead of create a new instance of
> > it?
> No... you move the sensitive code *out* of the Servlet into a Singleton, and
> then code in your Servlet interacts with that Singleton.
> Can you post a snippet of code that shows what you're trying to do and why
> you're trying to make your Servlet a Singleton?  Maybe someone will have a
> suggestion.
> -- 
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management

Felipe Schnack
Analista de Sistemas
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
Fone/Fax.: (51)32303341

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message