ResourceBundle rb = ResourceBundle.getBundle("myApp.properties", new
Locale("en", "EN"));Of course, you should use the same locale as your request. -- Samuel Santos http://www.samaxes.com/ On Wed, Apr 1, 2009 at 2:24 AM, Philip Constantinou < [email protected]> wrote: > Apache Commons configurations: > > http://commons.apache.org/configuration/howto_properties.html > > Is a really nice set of libraries that is a bit better than just using > java.util.Properties. It's abstraction also makes it easier to change > your mind about where you're putting your properties. > > If I remember correctly the reason for the URL is a legacy from the > old applet days. > > It's no better than using the InputStream. > > > On Mar 31, 2009, at 6:09 PM, AK wrote: > > > On IRC I got the following suggestion for reading a properties file: > > > > URL aURL = getClass().getClassLoader().getResource("myApp.properties") > > > > The other suggestion I found online was: > > > > InputStream inStream = > > this.getClass().getClassLoader().getResourceAsStream > > ("myApp.properties"); > > > > Is there a preference or advantage of one way over the other? > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Stripes-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/stripes-users > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users >
------------------------------------------------------------------------------
_______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
