Are those servlets in different web-apps? If so then servlet1 of app1 is defined in scope of classloader1 and so is the class with it's static variable. Servlet2 of app2 is defined in scope of classloader2 and has it's own copy of class. though it is static it has it's own class with static variable.

You approach will only work with servlet1 and servlet2 in same web-app.

Peter Huber

"S.N.Prabaharan" wrote:

Hi all ,
I need Clarification.
I'm having a static variable in a class which is used by a servlet.
I'm initializing that variable in the init Method of the servlet .
I'm modifying that static variable in  that class=20
by another servlet.
But it is not reflecting in the other servlets..
why..
can anyone please help it out..

Cheers,
S.N.Prabaharan

--

Peter Huber
(IT Consultant)

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

evodion Information Technologies
GmbH & Co KG
Geschäftsstelle München
Witneystr.1
D-82008 Unterhaching
Telefon: +49-89-66561 - 128
Fax:     +49-89-66561 - 199
e-mail: mailto:[EMAIL PROTECTED]
Germany Web: http://www.evodion.de
  ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to