• Post Reply Bookmark Topic Watch Topic
  • New Topic

Global defaults

 
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!