This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between getServletContext().setAttribute() and public data members in servlet class?

 
Gautam Bhalla
Ranch Hand
Posts: 30
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is difference between getServletContext().setAttribute() and public data members in servlet classes?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difference is the scope in which these variables are visible.

Bill
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64699
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And that public data members in the servlets will cause no end of threading issues and problems.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic