struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Black <>
Subject Re: not working
Date Fri, 10 Jun 2011 18:35:20 GMT
Hey Mitch.

FWIW I tried to access the properties file from a sample without success.  

I found the following in my copy of WebWork In 
Action: The file is intended for the following:

Other properties files to load in addition to Useful if 
you’re making packaged applications that are designed to be customized.

Of course the webwork references have been renamed to struts: What do you think?


From: "" <>
To: Struts Users Mailing List <>
Sent: Fri, June 10, 2011 1:12:06 PM
Subject: Re: not working

I checked out the struts 2 source and added more logging so ensure the 
properties are getting loaded and they are.

There must not be a way to reference the property from a jsp is my guess.

<s:text> can only grab properties loaded using the setting: 

Please let me know if this is correct.

Thank you.


Date:   06/10/2011 12:13 PM
Subject: not working

I have some custom properties I want available in my application. 
Unfortunately,  I am unable to get the properties to work in struts 2.2.3

My property file is located:  WEB-INF\classes\

Contents of

theme.debug.value = true
static.content.server.url = /static
jquery.core.version = 1.6.1
jquery.ui.version = 1.8.13
jquery.ui.external.bgiframe.version = 2.1.2

My file contains the following property:

Here is how I'm attempting to reference the property:

<s:text name="static.content.server.url" />

I also looked at the struts2 source to make sure I am using the property 
correctly (package org.apache.struts2.config.SettingsTest ).

Judging from this test class it appears that I am:

    public void testSettings() {
        assertEquals("12345", Settings.get(StrutsConstants.
        assertEquals("\temp", Settings.get(StrutsConstants.

        assertEquals("test,org/apache/struts2/othertest", Settings.get( 
        assertEquals("testvalue", Settings.get("testkey"));
        assertEquals("othertestvalue", Settings.get("othertestkey"));

        int count = getKeyCount();
        assertEquals(12, count);

Is there a way to expose what properties are available for reference?

What am I missing here?

Thank you.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message