You could write a property file stored in the same directory as your
servlet(or bean) class file, then load them in a Properties object with
Properties.load(HttpServlet.getClass().getResourceAsStream());
s. cachat
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
--
_______________________________________________________________________
---- ---- - --- Stephane Cachat - Developpement JAVA
/ / / / / email : [EMAIL PROTECTED]
---- / / / / tel : +33 (4) 72 69 59 00
/ /\ / / / fax : +33 (4) 72 69 59 01
---- ---\ ---- --- SQLI - 66 quai Ch. de Gaulle - 69006 LYON
===========================================================================
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