This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Global defaults  RSS feed

 
Matthew Webster
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I facing an issue and was wondering if anyone had done the same:
I am writing a collection of TagLibs for various things. Most tags will have attributes with names like 'name', 'value', 'default' etc. Has anyone got a decent way of providing a set of default values for all of these tags and their attributes which can be provided by some method or other from within, say, the initial servlet call?
My problem is more one of having too many options, than not enough.

Thanx,
Matt.
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you could create a DefaultValues JavaBean in the init method of a servlet and put it it the session, where all your JSPs can access it.
Or you can just declare all the default values as context parameters in the deployment descriptor file.
HTH
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!