A project I am assigned to is to create a i18n custom tablib process that allows for resource string updates as they are pushed to the server without the need of a server restart.
Main problem they have with trying to use the standard fmt JSTL is it would seem that once the properties file is initially referenced from an fmt call in a jsp it is cached. All subsequent references to this properties file remain static until a server restart.
Is this behavior a product of the fmt library, or is this the result of standard application server implementation?
It would seem the former as I can start the server and can edit the properties file in place which is represented by the output from the jsp on initial reference, but any changes to the properties file thereafter are ignored. It would appear that fmt adds the resource bundle instance into the session scope (at least) upon initial load ? I can understand the reasoning behind wanting to avoid the cost of rereading on each reference, but can this behavior be avoided without a re-write?
Actually... if you check the Java 6 API documentation for ResourceBundle, you'll see a section headed "Cache Management". Presumably you won't be able to make JSTL clear the cache, but your own taglib could work with the new features.
posted 8 years ago
Paul Clapham wrote:Actually... if you check the Java 6 API documentation for ResourceBundle, you'll see a section headed "Cache Management". Presumably you won't be able to make JSTL clear the cache, but your own taglib could work with the new features.
Well I'll be darned. I've been using ResourceBundle for ions and never noticed this behavior before. Assumed it was a web app optimization policy.
Thanks for the pointer.