File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Global defaults Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Global defaults" Watch "Global defaults" New topic
Author

Global defaults

Matthew Webster
Ranch Hand

Joined: May 10, 2001
Posts: 51
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.


Matthew Webster - eudoxus@freeuk.com<br /><a href="http://www.matthewwebster.homeunix.net/" target="_blank" rel="nofollow">http://www.matthewwebster.homeunix.net/</a>
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
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
 
 
subject: Global defaults
 
Threads others viewed
Tag Libraries Help?
Tags
mock question regarding dynamic attribute
validation part is not working in my stuts.
Lose 3D Look on Text Fields in HTML
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture