Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Access a Servlet config from a non-Servlet  RSS feed

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my problem.
I got a Bean that I want to access some config information or better yet a variable that that was stored as an application scope... Is that possible?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, a ServletConfig is an object like any other so you could pass it to the Bean constructor so the bean could get some variables. However, remember that it is the sevlet engine's responsibility to manage the ServletConfig so don't try to keep a copy or otherwise manipulate it.
Bill
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!