keep in mind that static is only "static" within the current classloader(your webapp).
your servlets will have many threads that share your servlet member fields, but each request is on its own thread, so the doGet() instance is unique to that request. how do you know that you have 3 instances of the servlet? have you defined multiple times in web.xml or have you defined 3 contexts that share the same servlet? > -----Original Message----- > From: Rui Fernandes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 29, 2002 6:41 AM > To: Tomcat Users List > Subject: RE: Servlet Instances > > > No, > Is just like that. > But I change things with static variables to control that > servlets don't > instantiate what others instantiated before, and share access to the > necessary classes through static references. > But I find that this doesn't solve the problem... My > conclusion, somehow > there are 3 Tomcats running!?!? But only one seems to be > responsible for > remote calls. > > Strange, very strange indeed.... just can't get it. > > > ----- Original Message ----- > From: Nikola Milutinovic <[EMAIL PROTECTED]> > To: Tomcat Users List <[EMAIL PROTECTED]> > Sent: Thursday, August 29, 2002 12:29 PM > Subject: Re: Servlet Instances > > > > > No, I am saying I have three instances of the same > servlet. Only one > appears > > > to be receiving the requests, but if things are like you > say then what's > > > going on with Tomcat? Are you saying I have three Tomcats > running, even > > > thought I called startup only once? > > > > Are you sure? Could it be that your mixing instances of a class with > threads running in the engine? > > > > Otherwise it is very strange. > > > > Nix. > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
