Re: Loading properties

2005-08-03 Thread David Durham
[EMAIL PROTECTED] wrote: Hi! I would like my web-app to read in a *.properties file at startup (not for i18n, but the good old java.util.Properties, for example to get the e-mail address of the admin of the web-app). So I wrote a ServletContextListener which will load the properties-file and sto

Re: Loading properties

2005-08-02 Thread Laurie Harper
[EMAIL PROTECTED] wrote: I would like my web-app to read in a *.properties file at startup (not for i18n, but the good old java.util.Properties, for example to get the e-mail address of the admin of the web-app). So I wrote a ServletContextListener which will load the properties-file and store it

Re: Loading properties

2005-08-02 Thread Gareth Evans
From within a class loaded by the Webapp class loader you can call InputStream is = this.getClass().getClassLoader().getResourceAsStream( "myProps.properties" ); Properties p = new Properties(); p.load( is ); Or from within an action/jsp you can do InputStream is = request.getSession().getServ

Loading properties

2005-08-02 Thread Peter . Zoche
Hi! I would like my web-app to read in a *.properties file at startup (not for i18n, but the good old java.util.Properties, for example to get the e-mail address of the admin of the web-app). So I wrote a ServletContextListener which will load the properties-file and store it into servlet context