• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Global defaults

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic