Hi Erik, Your option 1 seems reasonable to me, but perhaps instead of sending in the object to the tag as a parameter, make your initialization object a "singleton" type of object that you either setup when the web-server starts-up or on first use (lasy initialization). Then in your tag code you can grab the object from the objects Class directly via a static method (traditionaly ClassName.getInstance()).
Just my 2c Cheers Adrian > -----Original Message----- > From: Erik Beijnoff [SMTP:[EMAIL PROTECTED] > Sent: 13 June 2003 02:51 > To: [EMAIL PROTECTED] > Subject: Initialization file for tag - best practice? > > If a tag needs to build an object structure based on an initialization > file, what's the best way to do it? > > The BodyTag interface does not seem to have any sort of initialization > that's done onload, like Servlets and Filters. What's the reason for > this? Are they not meant to be used this way? > > The alternatives I'm facing are: > 1. Write some sort of separate initialization procedure to read in the > initialization file on web server start up. Then send the created object > structure that reflects the initialization file as a parameter to the > tag. > > 2. Use another approach, since the tags architecture does not seem to be > created for config initialization. For example trying to use a filter > for the task instead. > > Regards > Erik Beijnoff > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > http://erik.beijnoff.com/aleph-null > > ========================================================================== > = > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com -- It is the strict policy of Truworths that its e-mail facility and all e-mail communications emanating therefrom, should be utilised for business purposes only and should conform to high professional and business standards. Truworths has stipulated certain regulations in terms whereof strict guidelines relating to the use and content of e-mail communications are laid down. The use of the Truworths e-mail facility is not permitted for the distribution of chain letters or offensive mail of any nature whatsoever. Truworths hereby distances itself from and accepts no liability in respect of the unauthorised use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. Truworths furthermore disclaims liability for any unauthorised instruction for which permission was not granted. Truworths Limited accepts no liability for any consequences arising from or as a result of reliance on this message unless it is in respect of bona fide Truworths business for which proper authorisation has been granted. Any recipient of an unacceptable communication, a chain letter or offensive material of any nature is requested to notify the Truworths e-mail administrator ([EMAIL PROTECTED]) immediately in order that appropriate action can be taken against the individual concerned. =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com