Statis Class view in java
Hi All,
I just want to clarify myself on 1 concept this is related to a *static class*.
Suppose you have 2 seperate projects deployed on a same Tomcat, where in each project there is a static class with a *same name* . Now my question is would these 2 projects have a shared view of this static class OR each project would have its own view?
Lets assume, In one project, this static class has a variable Name="proj 1", where as the same class in the other project has a variable's value Name = "proj 2".
Now would the value of this variable be different in each project or same?
I hope i have made myself clear.
thanks in advance
[674 byte] By [
buttspa] at [2007-11-27 7:10:45]

> Suppose you have 2 seperate projects deployed on a
> same Tomcat, where in each project there is a static
> class with a *same name* . Now my question is would
> these 2 projects have a shared view of this static
> class OR each project would have its own view?
there is no such thing as a project, but i suppose each web app will have its own context and thus its own class.
Ok I have 2 different web application. So you are suggesting that even if we use the same name static class, (which in my case a proprty class) in 2 different web applications, then each woudl have its own view?thanks.
from view i meant like the following:
String name = propertyClass.getName(); // web application 1
String name = propertyClass.getName(); // web application 2
So in web application 1 the value woudl be = "proj 1"; and in web application 2 the value would be = "proj 2";
Is this assumption here is right?