Mike Engelhart wrote:

> OK, so what is the best way to initialize and store the resource bundles?
> It seems to me that  you would do this in the init() method of the servlet
> and store it as static and then handle all the Locale calls from within the
> servlet and only pass the servlet the needed String's?  I'm concerned with
> the overhead of reading in a properties file for the resource bundle to be
> used in the application?
>

In my implementation, the properties files get loaded once, when the
"bundleBean" is first created.  This happens (in my case) in the init method
of a special startup servlet that is loaded when the servlet engine is
started.  This servlet also initializes a bunch of other stuff not related to
I18N that is also stored in context attributes, such as connection pools,
caching of some data that is very commonly accessed but rarely changed, and
several factory objects that create my other business objects as needed.

Servlet engines that implement the 2.2 spec (when it's finalized) will have
some additional capabilities to declare access to the resources they need via
JNDI-looked-up names for datasources, EJBs, resources, and other things.  This
stuff will get initialized when the application is started up in the servlet
container.

>
> Mike
>

Craig

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
For JSP FAQ, http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to