OK, requested to build components using a set of global constants. So in Perl I always had a pm with constants and I could query that. The data will be used all over the site. I assume I can do a jar with the same thing. Is there a better way ? These are things like:copyrightText = "Copyright 2000-2010"phoneNumber="1-800-...."etc.
It depends on where and how these will be used. If these are something that you need in XSL display then you could possibly have an "included" XSL that has all of the name / value templates or something.
How about creating a custom LS token for this? Your name value will still have to go in some .properties file or spring config or some external DB. I've done something similar in the past. Client had "interest rates" all over their site that were updated frequently. We customized TinyMCE with a custom drop-down that inserted token into their content -- something like this: [$REGULAR-APR] or [$GOLD-CREDITCARD-APR]. In addition we created a custom DCT, where the user will enter the name/value for these tokens -- this way business users can easily update the token values in one place and it'll reflect on their entire site. HTH!