> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> The approach I take for properties files is to use a PropertyResourceBundle to
> load them. This class finds the properties file in the class path, so you
> don't
> have to worry about specifying where the file exists. Examples of using this
> class can be found in the Internationalization section of the JDK 1.1 or JDK
> 1.2
> documentation bundle. It is quite useful even if you do not need the
> multi-language support that is also supported.
If you use a PropertyResourceBundle and store the access method (say
getMyPropertyString(Locale l, String str) in a class that has application
level scope, the bundle is only loaded the first time it is accessed
correct? I have my internationalization resources being read in on servlet
init and then my shared resource class (LocalResources) has methods like:
public String getAirString(Locale loc, String message)
{
ResourceBundle curBundle =
ResourceBundle.getBundle("com.earthtrip.MyClass", loc);
return curBundle.getString(message);
}
Is this the normal way to do this?
===========================================================================
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