struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Djordje Trifunovic" <>
Subject [S2] <s:text> issue
Date Fri, 02 Feb 2007 20:01:21 GMT


Using Struts2 (2.0.5 snapshot) in a project, I hit the following problem: I
have a resource bundle key that I need to use with <s:text> tag to retrieve
a text from my resource bundle. The name of the key is in a property myKey
in the value stack. The value of myKey is "some.resource.key", and in the
property file I have:


    some.resource.key = Some text


I tried:


    <s:text name="#myKey" />


but that doesn't work as I expected. Instead of getting "Some text" on my
page, or at least "some.resource.key", I get "#myKey" instead. Just to be
sure everything is ok in the value stack, I tried:


    <s:property value="#myKey" />


And that returns "some.resource.key", as expected. Am I missing something



Djordje Trifunovic


PS. I am sorry if the issue was already discussed. I didn't find it quickly
searching through archive.


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