Replace default resourceBundle and resourceControl implementations in JSP web application

in an existing Web Application (JSP, Struts), localizations are managed through JSTL tags fmt:setbundle, fmt:message and .properties files.

I’d like to get rid of the .properties files and use an alternative datasource for localizations.

For my goal I’ve created custom ResourceBundle and ResourceControl implementations (details on where data is picked, xml, database, are out of scope), but I’m wondering how to register and use them in place of the default/factory file-based implementation, so I’m not forced to modify markup code (fmt:message…) among web application files.

I saw examples that point to replace fmtResourceKey session value but it’s limited to only one bundle and it looks like an “hack”.

Any good ideas?

Thanks for your help!

Source: jsp

Leave a Reply