Good Evening 

 

assume you are loading the properties file as

 Properties properties = new Properties();

  String string;
    try {
        properties.load(new FileInputStream("filename.properties"));

        string = properties.getProperty("user.description");
    } catch (IOException e) {
    }


if you place your variable into session with something like

ActionContext.getContext().getSession().put("user.description", string);

 

then you can access with 

<s:property value="#session.user.description"/> 

http://struts.apache.org/2.0.14/docs/ognl.html

 

does this help?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: pe...@josh.se
> To: user@struts.apache.org
> Date: Mon, 20 Jul 2009 16:21:18 +0200
> Subject: Problem with s:text expansion...
> 
> 
> Hi! I have an annoying problem with s:text expanding my named resources from
> the stack. Example:
> 
> <s:text name="user.description" />: <s:property value="user.description" />
> 
> The desired behavior is that s:text should print the localized text with the
> key "user.description" and s:property should print the value of
> user.getDescription() found on the stack. But s:text makes the same
> expansion - is it possible to prevent this?
> 
> It's of course easy to rename the text key, but since we are many working in
> this project, adding things to actions/property files can cause unexpected
> behavior.
> 
> Thanks in advance.
> 
> Regards
> Peter Björkman
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_________________________________________________________________
Windows Live™ SkyDrive™: Store, access, and share your photos. See how.
http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009

Reply via email to