We have seen situations where sometimes the global resource bundles are lost
intermittently for some sessions.  We are in a clustered/shared environment
where multiple apps are deployed onto a GlassFishV2 server. Multiple apps
share the struts2 core jars.

We have some pages where we have written a custom Resource loader and
everything looks fine on these pages. Problem is on pages that utilize
<s:text name="my.label.name"/>. Our properties files reside globally in
WEB-INF/lib

Our custom resource loader works as follows in a JSP

<%CustomMessageResrouce cusResource = new
CustomMessageResource("Resource")%>
<%= cusResource.getMessage("my.label.name")%>

Java code for it looks like:
import java.util.ResourceBundle;
ResourceBundle resource = ResourceBundle.getBundle(baseName);


So we know that loading properties into resourcebundles and using them as
shown above works.

My question is..can we do the same for struts2. Can we forcefully load the
resourcebundles inside java.util.ResourceBundle and then have them be used
in <s:text> tag?

Reply via email to