We are having issues with multiple Struts2 applicaiton WAR's installed to a GlassFishV2 server. These multiple apps all share the common Struts2.jar and few other core jars.
Issue we are having is that at times the global resource files are getting lost for some application when another application deploys a new build.
Global Resources are being stored in WEB-INF/lib
When the resources are lost then on the browser we see something like
my.tag.name
instead of
My tag Name
...considering that the properties file contained
my.tag.name = My tag Name
Is there anyway to avoid this on the code side, rather than tweaking with GlassFishv2 settings?
We've noticed that issue is happening only when we access the properties using struts 2 html tags like below
<s:text name="my.tag.name"/>
but when we manually load the resources like following, then we do not get errors:
CustomMessageResource cusResource = new CustomMessageResource("Resource");
<%=cusResource.getMessage("my.tag.name")%>
Our CustomeMessageResrource
class stores the resources in java.util.ResourceBundle
Is there any way to load resources into java.util.resourcebundle
from struts.properties
file and have them be used in <s:text>
tag
we also have struts.devMode = true