Different ways to use properties file in j2ee app

Posted by Omnipresent on Stack Overflow See other posts from Stack Overflow or by Omnipresent
Published on 2009-12-16T13:05:47Z Indexed on 2010/04/21 12:03 UTC
Read the original article Hit count: 292

Filed under:
|
|
|
|

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

© Stack Overflow or respective owner

Related posts about j2ee

Related posts about glassfish