views:

284

answers:

1

I have a j2ee app using Struts2. I have a gloabl properties file which is declared in struts.properties which resides in WEB-INF/classes. It has the following setting:

struts.custom.i18n.resources=mypropertyfile

mypropertyfile also resides in WEB-INF/classes

Say for example it contains the following:

pdf.test.title=PDF Test

then on jsp I use the following to make use of the property file

<s:text name="pdf.test.title"/>

This setup was working on Sun App server 8.2 but is not working on GlassFish App Server (I see pdf.test.title on the browser rather than PDF Test). I do not have access to GlassFish App server to try and tweak the setting to make it work. So I want to make changes to the code and see if that will help.

My question is:

What are some other ways to use properties file in a J2EE app? (using Struts2 or not). I'm also open to ways suggested to make changes on glassfish to make this work?

Build/version #'s

GlassFish = 9.1_02 (build b04-fcs)

Struts2 = 2.0.6

JRE6

A: 

Try changing your code to use "property" instead of "name":

<s:text property="pdf.test.title"/>
Scobal
This will not work. name is a required attribute to s:text tag
Omnipresent