Hi Hans,

What I usually do is to specify an init parameter with the name of a
properties file where I put all the properties that I want (log level,
connection strings, ...). I have a servlet that is always preloaded so I
read this file there, initialise the application-wide objects... etc. I
heard they are trying to include some application-start,
application-end... event handling in next releases of the JSDK spec so
this might be the good place to read and initialize this properties, in
the future. Meanwhile, I use the pre-loaded servlet approach but you
have to be careful with it, because the servlet engine might decide to
unload it and load it again.
I hope this helps,
Dan

Hans Gerwitz wrote:
>
> We would like to access some system-level properties in beans that we
> instantiate in JSPs.  Presently, we've been fine with using init arguments
> to our JSP servlet (GNUJSP under Apache/JServ) and using
> config.getInitParameter() to explicitly set properties in the JSP.  Now,
> though, we find ourselves wishing to have some parameters available at
> initialization, and have some design motivations to avoid passing certain
> environment properties in from JSP.
>
> Can I access the init parameters of the JSP page compilation servlet from
> within a bean?  Even better, how would I use a .properties file of my own
> (or access properties of the JServ servlet zone?)
>
> Thanks in advance,
> --
> [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

--
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to