• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Help...Static items in session beans

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hypothetical situation,
I have a java bean accessible from a JSP page using the <jsp:usebean> tag. The bean is declared to have "session" scope. This means that the bean's associated properties, etc. remain constant over the duration of the user's session and are "local" to that user.
Question:
If there are methods or variables defined inside the bean as "static", do those methods and variables retain the same values across different bean instances with "session" scope?
Example: User A and User B are each using a different instance of the bean mentioned above with session scope. If User A changes a property of the bean which internally is defined as static, will User B see the change?
Any help would greatly appreciated..
T
Does anyone know if a "static" method or variable declared in a java bean defined as having a "session" scope in JSP
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

"trevor"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.

- satya
reply
    Bookmark Topic Watch Topic
  • New Topic