Craig McClanahan wrote:
>For PropertyResourceBundle objects, Java resolves resource package names using
the
> same class path it uses for finding classes. So, if you have a property
bundle
> named "com.mycompany.mypackage.Resources.properties", it should be in the same
> place (either directory or nested in a JAR/ZIP file) that you would put a
class
> named "com.mycompany.mypackage.MyClass.class". You would access it by saying:
>
> ResourceBundle bundle =
> ResourceBundle.getBundle("com.mycompany.mypackage.Resources");
>
Yeah, i figured out the path situation after I wrote some test servlets.
Thanks.
Regarding ResourceBundles, when the API docs say that this class caches
resource bundles so that subsequent calls to getBundle won't reload the
property files, does that mean, I can just call the static
"ResourceBundle.getBundle("myResourceBundle")" from anywhere in my
application and get the cached object that is stored in my LocaleBean object
or do I have to specifically call the resource bundle that I have created to
share with my servlets and do something like:
LocaleBean lb = getServletContext().getAttribute("LocaleBean");
ResourceBundle rb = getResourceBundle();
rb.getBundle("myResourceBundle");
Thanks again.
mike
===========================================================================
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