users@glassfish.java.net

Struts2 Properties file does not load

From: Bhaarat Sharma <bhaarat.s_at_gmail.com>
Date: Thu, 14 Jan 2010 14:47:20 -0500

Hello,

We are experiencing a problem with loading Struts 2 properties file.

Our Structure:
    WEB-INF/classes contains MyResources.properties file. For this example
assume it has just one property.
        my.label.name=Label 1

    in our struts.properties we mention this properties file
like: struts.custom.i18n.resources=MyResources

    in our JSPs we refer to the properties like following: <s:text name="
my.label.name"/>

Issue:
    What is happening is that at times in our JSP, instead of seeing "Label
1" we see "my.label.name". This leads us to believe that the properties
file is not loading.

Our Environment:
    We are in a clusetered Glassfish environment where multiple apps are
deployed and all of them use Struts2. So struts2 jars are placed in a
common repository for all apps to use.

This does not happen on our local GlassFish server which just has our
application.

Has someone came across this issue before? or has a workaround for this?

What we have tried:
   We've tried to wrap <s:text tag with <s:i18n but even that does not solve
the issue.

This is not a struts2 issue but a GlassFish + struts2 issue as we were
working fine on Sun App Server 8.2 with the same exact setup (except
Struts2.jar being shared).

Can someone shed some light on this one?